2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Exception - Perform a task exception.
8 #include <exec/execbase.h>
9 #include <aros/asmcall.h>
11 /*****i*************************************************************************
14 #include <proto/exec.h>
16 AROS_LH0(void, Exception
,
19 struct ExecBase
*, SysBase
, 11, Exec
)
22 Exception handler. This function is called by the dispatcher if
23 a task exception has occured. It is called in the Disable()'d
24 state so that all signals are still unchanged.
26 TF_EXCEPT is still set and must be reset by this route.
28 The exception code is called with the following parameters:
30 A1 - Task->tc_ExceptData
31 D0 - Mask of Flags which caused this exception.
39 Exec internal function.
50 ******************************************************************************/
54 struct Task
* this = FindTask (NULL
);
58 this->tc_Flags
&= ~TF_EXCEPT
;
60 nestCnt
= SysBase
->IDNestCnt
;
61 SysBase
->IDNestCnt
= 0;
63 while ((flags
= (this->tc_SigExcept
& this->tc_SigRecvd
)))
65 flags
^= this->tc_SigExcept
;
66 flags
^= this->tc_SigRecvd
;
70 /* Call the Exception with the new AROS ASMCALL macros */
71 if( this->tc_ExceptCode
!= NULL
)
73 this->tc_SigExcept
= AROS_UFC3(ULONG
, this->tc_ExceptCode
,
74 AROS_UFCA(APTR
, this->tc_ExceptData
, A1
),
75 AROS_UFCA(ULONG
, flags
, D0
),
76 AROS_UFCA(struct ExecBase
*, SysBase
, A6
));
81 We don't have an exception handler, we shouldn't have
82 any exceptions. Clear them.
85 this->tc_SigExcept
= 0;
90 SysBase
->IDNestCnt
= nestCnt
;