Added support for compiling C++ files. It isn't included for all
[AROS.git] / arch / .unmaintained / dummy / exception.c
blob4b3f94b0614c9171e2babd53105666d0d2f38163
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <exec/execbase.h>
7 #include <clib/exec_protos.h>
8 #include <machine.h>
10 void exception(struct ExecBase *SysBase)
12 struct Task *me=SysBase->ThisTask;
13 ULONG sig;
14 APTR data;
15 BYTE idn;
16 me->tc_Flags&=~TF_EXCEPT;
17 idn=SysBase->IDNestCnt;
18 SysBase->IDNestCnt=0;
19 for(;;)
21 sig=me->tc_SigExcept&me->tc_SigRecvd;
22 if(!sig)
23 break;
24 me->tc_SigExcept^=sig;
25 me->tc_SigRecvd ^=sig;
26 data=me->tc_ExceptData;
27 Enable();
28 sig=((ULONG(*)(ULONG,APTR,struct ExecBase*))me->tc_ExceptCode)
29 (sig,data,SysBase);
30 Disable();
31 me->tc_SigExcept|=sig;
33 SysBase->IDNestCnt=idn;