18,11 → 18,11 |
|
/** |
------------ |
CVS : $Id: signal.c,v 1.2 2002-11-11 08:34:09 pj Exp $ |
CVS : $Id: signal.c,v 1.1.1.1 2002-03-29 14:12:52 pj Exp $ |
|
File: $File$ |
Revision: $Revision: 1.2 $ |
Last update: $Date: 2002-11-11 08:34:09 $ |
Revision: $Revision: 1.1.1.1 $ |
Last update: $Date: 2002-03-29 14:12:52 $ |
------------ |
|
This file contains: |
108,7 → 108,7 |
* A queue of all threads waiting in sigwait. |
* It is not static because it is used into the task_kill...ð |
*/ |
static IQUEUE sigwaiters; |
static QUEUE sigwaiters; |
|
|
/*+ An array of queues of pending signals posted with sigqueue(). +*/ |
331,7 → 331,7 |
LEVEL l; |
|
/* Reactivate the task... */ |
iq_extract(p, &sigwaiters); |
q_extract(p, &sigwaiters); |
|
l = proc_table[p].task_level; |
level_table[l]->task_insert(l,p); |
469,9 → 469,9 |
* in sigwait will have blocked the signals being waited for). |
*/ |
|
for (task = iq_query_first(&sigwaiters); |
for (task = sigwaiters; |
task != NIL; |
task = iq_query_next(task, &sigwaiters)) { |
task = proc_table[task].next) { |
if (sigismember(&proc_table[task].sigwaiting, signo)) { |
LEVEL l; |
|
479,7 → 479,7 |
sigaddset(&proc_table[task].sigpending, signo); |
|
/* Reactivate the task... */ |
iq_extract(task, &sigwaiters); |
q_extract(task, &sigwaiters); |
l = proc_table[task].task_level; |
level_table[l]->task_insert(l,task); |
|
614,9 → 614,9 |
* the FIFO order, and how to prevent lost signals in the case that |
* a thread calls sigwait before the woken thread runs and gets it. |
*/ |
for (task = iq_query_first(&sigwaiters); |
for (task = sigwaiters; |
task != NIL; |
task = iq_query_next(task, &sigwaiters)) { |
task = proc_table[task].next) { |
if (sigismember(&proc_table[task].sigwaiting, signo)) { |
LEVEL l; |
|
624,7 → 624,7 |
sigaddset(&proc_table[task].sigpending, signo); |
|
/* Reactivate the task... */ |
iq_extract(task, &sigwaiters); |
q_extract(task, &sigwaiters); |
|
l = proc_table[task].task_level; |
level_table[l]->task_insert(l,task); |
697,7 → 697,7 |
proc_table[p].control |= SIGTIMEOUT_EXPIRED; |
|
/* insert the task into the ready queue and extract it from the waiters */ |
iq_extract(p, &sigwaiters); |
q_extract(p, &sigwaiters); |
|
l = proc_table[p].task_level; |
level_table[l]->task_insert(l,p); |
754,7 → 754,7 |
* Grab the first queue entry. |
*/ |
sos = sigqueued[thissig]; |
sigqueued[thissig] = sig_queue[sos].next; |
sigqueued[thissig] = sig_queue[sigqueued[thissig]].next; |
|
/* |
* If that was the last one, reset the process procsigpending. |
834,7 → 834,7 |
* find a thread in sigwait, but it will not be able to wake it up |
* until the waitlock is released in the switch code. |
*/ |
iq_insertfirst(exec_shadow, &sigwaiters); |
q_insertfirst(exec_shadow, &sigwaiters); |
proc_table[exec_shadow].status = WAIT_SIG; |
|
if (timeout) { |
890,8 → 890,7 |
/* |
* Grab the first queue entry. |
*/ |
sos = sigqueued[thissig]; |
sigqueued[thissig] = sig_queue[sos].next; |
sos = q_getfirst(&sigqueued[thissig]); |
|
/* |
* If that was the last one, reset the process procsigpending. |
1069,7 → 1068,7 |
l = proc_table[exec_shadow].task_level; |
level_table[l]->task_extract(l,exec_shadow); |
|
iq_insertfirst(exec_shadow, &sigwaiters); |
q_insertfirst(exec_shadow, &sigwaiters); |
proc_table[exec_shadow].status = WAIT_SIGSUSPEND; |
|
/* and finally we reschedule */ |
1501,7 → 1500,7 |
proc_table[i].delay_timer = -1; |
} |
|
iq_extract(i, &sigwaiters); |
q_extract(i, &sigwaiters); |
|
l = proc_table[i].task_level; |
level_table[l]->task_insert(l,i); |
1545,7 → 1544,7 |
|
procsigpending = 0; |
|
iq_init(&sigwaiters, &freedesc, 0); |
sigwaiters = NIL; |
alarm_timer = -1; |
|
/* Interrupt handling init */ |