revert between 56095 -> 55830 in arch
[AROS.git] / rom / exec / freetrap.c
blob1cb85a37662813b76e8a6e81f39975721f5d5daa
1 /*
2 Copyright © 1995-2009, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Free a trap.
6 Lang: english
7 */
8 #include "exec_intern.h"
9 #include <proto/exec.h>
11 /*****************************************************************************
13 NAME */
15 AROS_LH1(void, FreeTrap,
17 /* SYNOPSIS */
18 AROS_LHA(long, trapNum, D0),
20 /* LOCATION */
21 struct ExecBase *, SysBase, 58, Exec)
23 /* FUNCTION
25 INPUTS
27 RESULT
29 NOTES
31 EXAMPLE
33 BUGS
35 SEE ALSO
37 INTERNALS
38 Very similar to FreeSignal()
40 *****************************************************************************/
42 AROS_LIBFUNC_INIT
44 if(trapNum!=-1)
46 /* No more atomic problem - i beleive THIS is atomic. - sonic */
47 struct Task *me = GET_THIS_TASK;
48 if (me)
50 if (me->tc_Flags & TF_ETASK) {
51 struct ETask *et = me->tc_UnionETask.tc_ETask;
53 et->et_TrapAlloc &= ~(1<<trapNum);
54 } else
55 me->tc_TrapAlloc &= ~(1<<trapNum);
59 AROS_LIBFUNC_EXIT
60 } /* FreeTrap */