2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Examine and/or modify the signals which cause an exception.
8 #include <exec/execbase.h>
9 #include <aros/libcall.h>
10 #include <proto/exec.h>
12 /*****************************************************************************
16 AROS_LH2(ULONG
, SetExcept
,
19 AROS_LHA(ULONG
, newSignals
, D0
),
20 AROS_LHA(ULONG
, signalSet
, D1
),
23 struct ExecBase
*, SysBase
, 52, Exec
)
26 Change the mask of signals causing a task exception.
29 newSignals - Set of signals causing the exception.
30 signalSet - Mask of affected signals.
33 Old mask of signals causing a task exception.
42 AllocSignal(), FreeSignal(), Wait(), SetSignal(), Signal()
46 ******************************************************************************/
53 /* Get pointer to current task */
56 /* Protect mask of sent signals and task lists */
62 /* Change exception mask */
63 me
->tc_SigExcept
=(old
&~signalSet
)|(newSignals
&signalSet
);
65 /* Does this change include an exception? */
66 if(me
->tc_SigExcept
&me
->tc_SigRecvd
)
68 /* Yes. Set the exception flag. */
69 me
->tc_Flags
|=TF_EXCEPT
;
71 /* Are taskswitches allowed? (Don't count own Disable() here) */
72 if(SysBase
->TDNestCnt
>=0||SysBase
->IDNestCnt
>0)
73 /* No. Store it for later. */
74 SysBase
->AttnResched
|=0x80;
76 /* Switches are allowed. Force a reschedule. */