18,11 → 18,11 |
|
/** |
------------ |
CVS : $Id: signal.c,v 1.12 2005-01-08 14:46:18 pj Exp $ |
CVS : $Id: signal.c,v 1.13 2005-05-10 17:14:51 mauro Exp $ |
|
File: $File$ |
Revision: $Revision: 1.12 $ |
Last update: $Date: 2005-01-08 14:46:18 $ |
Revision: $Revision: 1.13 $ |
Last update: $Date: 2005-05-10 17:14:51 $ |
------------ |
|
This file contains: |
1291,9 → 1291,9 |
|
if (!(act.sa_flags & SA_SIGINFO) && act.sa_handler == SIG_DFL) { |
/* Default action for all signals is termination */ |
kern_printf("\nSignal number %d...\n",sig); |
//kern_printf("\nSignal number %d...\n",sig); |
if (act.sa_flags & SA_SIGINFO) |
kern_printf("with value : %d\n",info->si_value.sival_int); |
//kern_printf("with value : %d\n",info->si_value.sival_int); |
exit(ASIG_DEFAULT_ACTION); |
} |
|
1386,6 → 1386,7 |
/* Interrupt handling table */ |
static struct int_des { |
void (*fast)(int n); |
void (*intdrv)(int n); |
PID proc_index; |
BYTE isUsed; |
BYTE irqLock; |
1400,6 → 1401,7 |
int no = *(int *)n; |
PID p; |
|
//kern_printf("(irq_fasthandler: no %d)",no); |
/* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_interrupt_start,(unsigned short int)no,0); |
|
1411,6 → 1413,10 |
kern_cli(); |
} |
|
if (int_table[no].intdrv != NULL) { |
add_interrupt_job(no, int_table[no].intdrv); |
} |
|
TRACER_LOGEVENT(FTrace_EVT_interrupt_end,(unsigned short int)no,0); |
|
/* If a sporadic process is linked,activate it */ |
1424,7 → 1430,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, BYTE lock) |
int handler_set(int no, void (*fast)(int n), BYTE lock, PID pi, void (*intdrv)(int n)) |
{ |
SYS_FLAGS f; |
|
1434,7 → 1440,7 |
} |
|
f = kern_fsave(); |
//kern_printf("handler_set: no %d pid %d\n",no, pi); |
//kern_printf("(handler_set: no %d pid %d)",no, pi); |
if (int_table[no].isUsed == TRUE) { |
kern_frestore(f); |
errno = EUSED_INT_NO; |
1441,6 → 1447,7 |
return -1; |
} |
int_table[no].fast = fast; |
int_table[no].intdrv = intdrv; |
int_table[no].proc_index = pi; |
int_table[no].isUsed = TRUE; |
int_table[no].irqLock = lock; |
1462,6 → 1469,7 |
} |
|
f = kern_fsave(); |
//kern_printf("(handler_remove: no %d )",no); |
if (int_table[no].isUsed == FALSE) { |
kern_frestore(f); |
errno = EUNUSED_INT_NO; |
1469,6 → 1477,7 |
} |
|
int_table[no].fast = NULL; |
int_table[no].intdrv = NULL; |
int_table[no].proc_index = NIL; |
int_table[no].isUsed = FALSE; |
int_table[no].irqLock = FALSE; |
1480,6 → 1489,11 |
return 1; |
} |
|
void *handler_get_intdrive(int no) |
{ |
return int_table[no].intdrv; |
} |
|
/* this is the test that is done when a task is being killed |
and it is waiting on a sigwait */ |
static int signal_cancellation_point(PID i, void *arg) |
1539,6 → 1553,7 |
/* Interrupt handling init */ |
for (i=0; i<16; i++) { |
int_table[i].fast = NULL; |
int_table[i].intdrv = NULL; |
int_table[i].proc_index = NIL; |
int_table[i].isUsed = FALSE; |
int_table[i].irqLock = FALSE; |