Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1005 → Rev 1018

/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.14 2006-03-03 17:14:47 mauro Exp $
 
File: $File$
Revision: $Revision: 1.13 $
Last update: $Date: 2005-05-10 17:14:51 $
Revision: $Revision: 1.14 $
Last update: $Date: 2006-03-03 17:14:47 $
------------
 
This file contains:
1396,12 → 1396,14
/* The fast handler is a standard piece of code which runs with */
/* interrupts enabled to allow interrupt nesting */
 
extern int add_interrupt_job(int no);
 
void irq_fasthandler(void *n)
{
int no = *(int *)n;
PID p;
 
//kern_printf("(irq_fasthandler: no %d)",no);
kern_printf("(irq_fasthandler: no %d)",no);
/* tracer stuff */
TRACER_LOGEVENT(FTrace_EVT_interrupt_start,(unsigned short int)no,0);
1414,7 → 1416,7
}
 
if (int_table[no].intdrv != NULL) {
add_interrupt_job(no, int_table[no].intdrv);
add_interrupt_job(no);
}
 
TRACER_LOGEVENT(FTrace_EVT_interrupt_end,(unsigned short int)no,0);
1433,18 → 1435,18
int handler_set(int no, void (*fast)(int n), BYTE lock, PID pi, void (*intdrv)(int n))
{
SYS_FLAGS f;
 
if ((no < 1) || (no > 15)) {
errno = EWRONG_INT_NO;
return -1;
errno = EWRONG_INT_NO;
return -1;
}
 
f = kern_fsave();
//kern_printf("(handler_set: no %d pid %d)",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;
return -1;
kern_frestore(f);
errno = EUSED_INT_NO;
return -1;
}
int_table[no].fast = fast;
int_table[no].intdrv = intdrv;
1464,16 → 1466,16
SYS_FLAGS f;
 
if (no < 1 || no > 15) {
errno = EWRONG_INT_NO;
return -1;
errno = EWRONG_INT_NO;
return -1;
}
 
f = kern_fsave();
//kern_printf("(handler_remove: no %d )",no);
kern_printf("(handler_remove: no %d )",no);
if (int_table[no].isUsed == FALSE) {
kern_frestore(f);
errno = EUNUSED_INT_NO;
return -1;
kern_frestore(f);
errno = EUNUSED_INT_NO;
return -1;
}
 
int_table[no].fast = NULL;