Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 940 → Rev 941

/shark/trunk/ports/first/first-sync.c
53,12 → 53,13
int index,oldindex;
index=hash_fun(synch_handle);
if (htable[index].id!=1) {
if (index<0) exit(-1);
 
if (htable[index].id==1) {
oldindex=index;
index = (index + 1) % MAX_HASH_ENTRY;
// find
while (htable[index].id != 1 && index!=oldindex) index=(index+1) % MAX_HASH_ENTRY;
while (htable[index].id == 1 && index!=oldindex) index=(index+1) % MAX_HASH_ENTRY;
if (index==oldindex) return FSF_ERR_TOO_MANY_SYNCH_OBJS;
}
//if (!synch_handle) return FSF_ERR_INVALID_SYNCH_OBJECT_HANDLE;
/shark/trunk/ports/first/first-contract.c
48,7 → 48,7
int fsf_init() {
 
FSF_start_service_task();
 
FSF_init_synch_obj_layer();
}
 
 
/shark/trunk/ports/first/first-server.c
91,7 → 91,7
pr.params=&m;
 
dummy_task_default_model(m);
 
// create the service task
// create the communication channel for negotiation and renegotiation
100,14 → 100,17
channel[0] = port_create("CHANR",sizeof(struct mess),1,STREAM,READ);
 
fsf_initialize_contract(&service_contract);
err=fsf_set_contract_basic_parameters(&service_contract,&default_budget,&default_period,FSF_DEFAULT_WORKLOAD);
if (err) exit(err);
 
fsf_set_contract_basic_parameters(&service_contract,&default_budget,&default_period,FSF_DEFAULT_WORKLOAD);
fsf_set_contract_timing_requirements (&service_contract,
err=fsf_set_contract_timing_requirements (&service_contract,
true,NULL,
budget_overrun_sig_notify,
budget_overrun_sig_value,
deadline_miss_sig_notify,
deadline_miss_sig_value);
if (err) exit(err);
 
negotiate_contract(&service_contract,&service_server);