Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1122 → Rev 1123

/demos/trunk/base/sig.c
18,11 → 18,11
 
/**
------------
CVS : $Id: sig.c,v 1.2 2002-11-11 08:20:44 pj Exp $
CVS : $Id: sig.c,v 1.3 2003-01-07 17:10:15 pj Exp $
 
File: $File$
Revision: $Revision: 1.2 $
Last update: $Date: 2002-11-11 08:20:44 $
Revision: $Revision: 1.3 $
Last update: $Date: 2003-01-07 17:10:15 $
------------
**/
 
81,14 → 81,19
return 0;
}
 
void catchit(int signo, siginfo_t *info, void *extra)
void catchit_RT(int signo, siginfo_t *info, void *extra)
{
cprintf("Current Running Task = %d signo=%d code=%d value=%d from pid=%d\n",
cprintf("RT signal: Current Running Task = %d signo=%d code=%d value=%d from pid=%d\n",
exec_shadow,
info->si_signo, info->si_code,
info->si_value.sival_int, info->si_task);
}
 
void catchit(int signo)
{
cprintf("RT signal: Current Running Task = %d signo=%d\n",
exec_shadow, signo);
}
 
int main(int argc, char **argv)
{
105,7 → 110,7
 
/* Set the signal action */
action.sa_flags = SA_SIGINFO;
action.sa_sigaction = catchit;
action.sa_sigaction = catchit_RT;
action.sa_handler = 0;
action.sa_mask = 0;