18,11 → 18,11 |
|
/** |
------------ |
CVS : $Id: signal.c,v 1.8 2003-12-10 16:54:59 giacomo Exp $ |
CVS : $Id: signal.c,v 1.9 2004-03-09 08:53:18 giacomo Exp $ |
|
File: $File$ |
Revision: $Revision: 1.8 $ |
Last update: $Date: 2003-12-10 16:54:59 $ |
Revision: $Revision: 1.9 $ |
Last update: $Date: 2004-03-09 08:53:18 $ |
------------ |
|
This file contains: |
107,8 → 107,7 |
|
/* |
* A queue of all threads waiting in sigwait. |
* It is not static because it is used into the task_kill...ð |
*/ |
* It is not static because it is used into the task_kill...� */ |
static IQUEUE sigwaiters; |
|
|
1388,6 → 1387,7 |
void (*fast)(int n); |
PID proc_index; |
BYTE isUsed; |
BYTE irqLock; |
} int_table[16]; |
|
/* Warning the interrupt can cause a preemption! */ |
1403,8 → 1403,10 |
TRACER_LOGEVENT(FTrace_EVT_interrupt_start,1,no,0); |
|
if (int_table[no].fast != NULL) { |
if (int_table[no].irqLock == FALSE) |
kern_sti(); |
(int_table[no].fast)(no); |
if (int_table[no].irqLock == FALSE) |
kern_cli(); |
} |
|
1421,7 → 1423,7 |
/* If the fast parameter is NULL, no handler is called. */ |
/* If the pi parameter is NIL no task is installed */ |
/*----------------------------------------------------------------------*/ |
int handler_set(int no, void (*fast)(int n), PID pi) |
int handler_set(int no, void (*fast)(int n), PID pi, BYTE lock) |
{ |
SYS_FLAGS f; |
|
1440,6 → 1442,7 |
int_table[no].fast = fast; |
int_table[no].proc_index = pi; |
int_table[no].isUsed = TRUE; |
int_table[no].irqLock = lock; |
|
irq_bind(no, irq_fasthandler, INT_FORCE); |
irq_unmask(no); |
1467,6 → 1470,7 |
int_table[no].fast = NULL; |
int_table[no].proc_index = NIL; |
int_table[no].isUsed = FALSE; |
int_table[no].irqLock = FALSE; |
|
irq_bind(no,NULL, INT_PREEMPTABLE); |
irq_mask(no); |
1473,7 → 1477,6 |
kern_frestore(f); |
|
return 1; |
|
} |
|
/* this is the test that is done when a task is being killed |
1495,9 → 1498,7 |
level_table[l]->public_unblock(l,i); |
|
return 1; |
} |
else if (proc_table[i].status == WAIT_SIGSUSPEND) { |
|
} else if (proc_table[i].status == WAIT_SIGSUSPEND) { |
l = proc_table[i].task_level; |
level_table[l]->public_unblock(l,i); |
|
1504,7 → 1505,6 |
return 1; |
} |
|
|
return 0; |
} |
|
1512,8 → 1512,7 |
{ |
int i; |
|
/* Initialize the default signal actions and the signal |
queue headers. */ |
/* Initialize the default signal actions and the signal queue headers. */ |
for (i = 0; i < SIG_MAX; i++) { |
sigactions[i].sa_handler = SIG_DFL; |
sigactions[i].sa_flags = 0; |
1541,6 → 1540,7 |
int_table[i].fast = NULL; |
int_table[i].proc_index = NIL; |
int_table[i].isUsed = FALSE; |
int_table[i].irqLock = FALSE; |
} |
|
register_cancellation_point(signal_cancellation_point, NULL); |