Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1005 → Rev 1004

/shark/trunk/kernel/signal.c
18,11 → 18,11
 
/**
------------
CVS : $Id: signal.c,v 1.13 2005-05-10 17:14:51 mauro Exp $
CVS : $Id: signal.c,v 1.12 2005-01-08 14:46:18 pj Exp $
 
File: $File$
Revision: $Revision: 1.13 $
Last update: $Date: 2005-05-10 17:14:51 $
Revision: $Revision: 1.12 $
Last update: $Date: 2005-01-08 14:46:18 $
------------
 
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);
}
 
1337,7 → 1337,7
PID sos; /* temp. PID */
 
v.sival_int = n;
//kern_printf("RAISE");
// kern_printf("RAISE");
 
/* sigqueue set the p field to exec_shadow... so whe change it for a
little... because sigqueue fill descriptor with exec_shadow... */
1386,7 → 1386,6
/* Interrupt handling table */
static struct int_des {
void (*fast)(int n);
void (*intdrv)(int n);
PID proc_index;
BYTE isUsed;
BYTE irqLock;
1401,7 → 1400,6
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);
1413,10 → 1411,6
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 */
1430,7 → 1424,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), BYTE lock, PID pi, void (*intdrv)(int n))
int handler_set(int no, void (*fast)(int n), PID pi, BYTE lock)
{
SYS_FLAGS f;
1440,7 → 1434,7
}
 
f = kern_fsave();
//kern_printf("(handler_set: no %d pid %d)",no, pi);
//kern_printf("handler_set: no %d pid %d\n",no, pi);
if (int_table[no].isUsed == TRUE) {
kern_frestore(f);
errno = EUSED_INT_NO;
1447,7 → 1441,6
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;
1469,7 → 1462,6
}
 
f = kern_fsave();
//kern_printf("(handler_remove: no %d )",no);
if (int_table[no].isUsed == FALSE) {
kern_frestore(f);
errno = EUNUSED_INT_NO;
1477,7 → 1469,6
}
 
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;
1489,11 → 1480,6
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)
1553,7 → 1539,6
/* 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;