18,11 → 18,11 |
|
/** |
------------ |
CVS : $Id: mqueue.c,v 1.2 2002-11-11 08:34:09 pj Exp $ |
CVS : $Id: mqueue.c,v 1.3 2003-01-07 17:07:49 pj Exp $ |
|
File: $File$ |
Revision: $Revision: 1.2 $ |
Last update: $Date: 2002-11-11 08:34:09 $ |
Revision: $Revision: 1.3 $ |
Last update: $Date: 2003-01-07 17:07:49 $ |
------------ |
|
POSIX message queues |
325,7 → 325,7 |
/* and the task have to be reinserted into the ready queues, so it |
will fall into task_testcancel */ |
l = proc_table[i].task_level; |
level_table[l]->task_insert(l,i); |
level_table[l]->public_unblock(l,i); |
|
return 1; |
} |
339,7 → 339,7 |
/* and the task have to be reinserted into the ready queues, so it |
will fall into task_testcancel */ |
l = proc_table[i].task_level; |
level_table[l]->task_insert(l,i); |
level_table[l]->public_unblock(l,i); |
|
return 1; |
} |
362,7 → 362,7 |
/* and the task have to be reinserted into the ready queues, so it |
will fall into task_testcancel */ |
l = proc_table[i].task_level; |
level_table[l]->task_insert(l,i); |
level_table[l]->public_unblock(l,i); |
|
return 1; |
} |
378,7 → 378,7 |
/* and the task have to be reinserted into the ready queues, so it |
will fall into task_testcancel */ |
l = proc_table[i].task_level; |
level_table[l]->task_insert(l,i); |
level_table[l]->public_unblock(l,i); |
|
return 1; |
} |
437,8 → 437,6 |
} |
else { |
LEVEL l; |
struct timespec ty; |
TIME tx; |
|
/* we block the task until: |
- a message is received, or |
447,19 → 445,10 |
|
mqproc_table[exec_shadow].intsig = 0; |
|
/* SAME AS SCHEDULER... manage the capacity event and the load_info */ |
ll_gettime(TIME_EXACT, &schedule_time); |
SUBTIMESPEC(&schedule_time, &cap_lasttime, &ty); |
tx = TIMESPEC2USEC(&ty); |
proc_table[exec_shadow].avail_time -= tx; |
jet_update_slice(tx); |
if (cap_timer != NIL) { |
event_delete(cap_timer); |
cap_timer = NIL; |
} |
kern_epilogue_macro(); |
|
l = proc_table[exec_shadow].task_level; |
level_table[l]->task_extract(l,exec_shadow); |
level_table[l]->public_block(l,exec_shadow); |
|
/* we insert the task in the message queue */ |
proc_table[exec_shadow].status = WAIT_MQSEND; |
513,7 → 502,7 |
proc_table[exec_shadow].context = ll_context_from(); |
|
l = proc_table[p].task_level; |
level_table[l]->task_insert(l,p); |
level_table[l]->public_unblock(l,p); |
|
/* Preempt if necessary */ |
scheduler(); |
603,8 → 592,6 |
} |
else { |
LEVEL l; |
struct timespec ty; |
TIME tx; |
|
/* we block the task until: |
- a message arrives, or |
613,19 → 600,10 |
|
mqproc_table[exec_shadow].intsig = 0; |
|
/* SAME AS SCHEDULER... manage the capacity event and the load_info */ |
ll_gettime(TIME_EXACT, &schedule_time); |
SUBTIMESPEC(&schedule_time, &cap_lasttime, &ty); |
tx = TIMESPEC2USEC(&ty); |
proc_table[exec_shadow].avail_time -= tx; |
jet_update_slice(tx); |
if (cap_timer != NIL) { |
event_delete(cap_timer); |
cap_timer = NIL; |
} |
kern_epilogue_macro(); |
|
l = proc_table[exec_shadow].task_level; |
level_table[l]->task_extract(l,exec_shadow); |
level_table[l]->public_block(l,exec_shadow); |
|
/* we insert the task into the message queue */ |
proc_table[exec_shadow].status = WAIT_MQRECEIVE; |
680,7 → 658,7 |
proc_table[exec_shadow].context = ll_context_from(); |
|
l = proc_table[p].task_level; |
level_table[l]->task_insert(l,p); |
level_table[l]->public_unblock(l,p); |
|
/* Preempt if necessary */ |
scheduler(); |