18,11 → 18,11 |
|
/** |
------------ |
CVS : $Id: cancel.c,v 1.2 2003-09-12 10:10:40 giacomo Exp $ |
CVS : $Id: cancel.c,v 1.3 2003-11-05 15:05:11 giacomo Exp $ |
|
File: $File$ |
Revision: $Revision: 1.2 $ |
Last update: $Date: 2003-09-12 10:10:40 $ |
Revision: $Revision: 1.3 $ |
Last update: $Date: 2003-11-05 15:05:11 $ |
------------ |
|
This file contains: |
85,10 → 85,12 |
/*+ This primitive set the cancellation state of the task +*/ |
int task_setcancelstate(int state, int *oldstate) |
{ |
kern_cli(); |
SYS_FLAGS f; |
|
f = kern_fsave(); |
if (state != TASK_CANCEL_ENABLE && |
state != TASK_CANCEL_DISABLE) { |
kern_sti(); |
kern_frestore(f); |
return -1; |
} |
|
96,7 → 98,7 |
proc_table[exec_shadow].control &= ~KILL_ENABLED; |
proc_table[exec_shadow].control |= state; |
|
kern_sti(); |
kern_frestore(f); |
return 0; |
} |
|
103,10 → 105,12 |
/*+ This primitive set the cancellation type of the task +*/ |
int task_setcanceltype(int type, int *oldtype) |
{ |
kern_cli(); |
SYS_FLAGS f; |
|
f = kern_fsave(); |
if (type != TASK_CANCEL_DEFERRED && |
type != TASK_CANCEL_ASYNCHRONOUS) { |
kern_sti(); |
kern_frestore(f); |
return -1; |
} |
|
114,6 → 118,6 |
proc_table[exec_shadow].control &= ~KILL_DEFERRED; |
proc_table[exec_shadow].control |= type; |
|
kern_sti(); |
kern_frestore(f); |
return 0; |
} |