2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Examine and/or modify the signals which cause an exception.
9 #include <exec/execbase.h>
10 #include <aros/libcall.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
17 AROS_LH2(ULONG
, SetExcept
,
20 AROS_LHA(ULONG
, newSignals
, D0
),
21 AROS_LHA(ULONG
, signalSet
, D1
),
24 struct ExecBase
*, SysBase
, 52, Exec
)
27 Change the mask of signals causing a task exception.
30 newSignals - Set of signals causing the exception.
31 signalSet - Mask of affected signals.
34 Old mask of signals causing a task exception.
43 AllocSignal(), FreeSignal(), Wait(), SetSignal(), Signal()
49 ******************************************************************************/
56 /* Get pointer to current task */
59 /* Protect mask of sent signals and task lists */
65 /* Change exception mask */
66 me
->tc_SigExcept
=(old
&~signalSet
)|(newSignals
&signalSet
);
68 /* Does this change include an exception? */
69 if(me
->tc_SigExcept
&me
->tc_SigRecvd
)
71 /* Yes. Set the exception flag. */
72 me
->tc_Flags
|=TF_EXCEPT
;
74 /* Are taskswitches allowed? (Don't count own Disable() here) */
75 if(SysBase
->TDNestCnt
>=0||SysBase
->IDNestCnt
>0)
76 /* No. Store it for later. */
77 SysBase
->AttnResched
|=0x80;
80 /* Switches are allowed. Force a rescedule. */
82 // me->tc_Node.ln_Pred->ln_Succ = me->tc_Node.ln_Succ;
83 // me->tc_Node.ln_Succ->ln_Pred = me->tc_Node.ln_Pred;