Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 317 → Rev 318

/shark/trunk/kernel/kill.c
18,11 → 18,11
 
/**
------------
CVS : $Id: kill.c,v 1.3 2003-01-07 17:07:49 pj Exp $
CVS : $Id: kill.c,v 1.4 2003-11-05 15:05:11 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.3 $
Last update: $Date: 2003-01-07 17:07:49 $
Revision: $Revision: 1.4 $
Last update: $Date: 2003-11-05 15:05:11 $
------------
 
This file contains:
223,8 → 223,10
*/
void task_abort(void *returnvalue)
{
kern_cli();
SYS_FLAGS f;
 
f = kern_fsave();
 
task_makefree(returnvalue);
 
ll_context_to(proc_table[exec_shadow].context);
239,18 → 241,19
int task_kill(PID i)
{
int j; /* a counter */
SYS_FLAGS f;
 
kern_cli();
f = kern_fsave();
if (proc_table[i].control & NO_KILL ||
proc_table[i].status == FREE) {
errno = EINVALID_KILL;
kern_sti();
kern_frestore(f);
return -1;
}
 
if (proc_table[i].control & KILL_REQUEST) {
/* the task was already killed before... do nothing!!! */
kern_sti();
kern_frestore(f);
return 0;
}
 
274,7 → 277,7
 
proc_table[i].control |= KILL_REQUEST;
 
kern_sti();
kern_frestore(f);
return 0;
}
 
285,6 → 288,7
{
BYTE autokill;
register PID i;
SYS_FLAGS f;
 
int j; /* a counter */
293,7 → 297,7
return -1;
}
 
kern_cli();
f = kern_fsave();
 
/* Detect suicide */
autokill = (g == proc_table[exec].group);
329,7 → 333,7
ll_context_to(proc_table[exec].context);
}
else
kern_sti();
kern_frestore(f);
 
return 0;
}