Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 877 → Rev 880

/shark/trunk/ports/first/server-task.c
34,13 → 34,12
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* CVS : $Id: server-task.c,v 1.8 2004-11-08 10:55:59 trimarchi Exp $
* CVS : $Id: server-task.c,v 1.9 2004-11-16 09:24:45 trimarchi Exp $
*/
 
#include "ll/i386/64bit.h"
#include "fsf_configuration_parameters.h"
#include "fsf_core.h"
#include "fsf_server.h"
#include "fsf.h"
#include "fsf_service_task.h"
#include "message.h"
#include <kernel/kern.h>
49,6 → 48,7
#include <modules/cabs.h>
 
//#define FSF_DEBUG
extern fsf_server_id_t service_server;
 
TASK service_task(void) {
55,6 → 55,9
struct mess msg;
fsf_renegotiation_status_t status;
int wait_renegotiation=0;
struct timespec next_act;
struct timespec period;
struct timespec act_time;
PORT rec,tra;
rec = port_connect("CHANW",sizeof(struct mess),STREAM,READ);
72,7 → 75,10
#endif
wait_renegotiation=0;
port_send(tra,&msg,BLOCK);
//task_endcycle();
//kern_gettime(&act_time);
//fsf_get_budget_and_period(service_server,NULL,&period);
//ADDTIMESPEC(&act_time, &period, &next_act);
//fsf_schedule_next_timed_job(&next_act,NULL,NULL,NULL,NULL);
continue;
} else
#ifdef FSF_DEBUG
90,7 → 96,12
case NEGOTIATE_CONTRACT:
if (negotiate_contract(&msg.contract, &msg.server)==FSF_ERR_CONTRACT_REJECTED)
msg.server=-1;
break;
else {
wait_renegotiation=1;
//task_endcycle();
continue;
}
break;
 
case REQUEST_RENEGOTIATE_CONTRACT:
if (renegotiate_contract(&msg.contract, msg.server)==FSF_ERR_CONTRACT_REJECTED)
113,8 → 124,12
}
// send response server is -1 if the operation fail
port_send(tra,&msg,BLOCK);
//kern_gettime(&act_time);
//fsf_get_budget_and_period(service_server,NULL,&period);
//ADDTIMESPEC(&act_time, &period, &next_act);
//fsf_schedule_next_timed_job(&next_act,NULL,NULL,NULL,NULL);
//task_endcycle();
//kern_printf("(ES)");
}
}
}
218,7 → 233,7
else {
return FSF_ERR_CONTRACT_REJECTED;
}
//kern_printf("(ENCR)");
return 0;
 
}