aros/m68k/fpucontext.h: Remove dependence on _fpmath.h
[AROS.git] / rom / exec / freetrap.c
blobdede8feaf527321385f64f066f652ce5e7f1d155
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 = SysBase->ThisTask;
49 if (me->tc_Flags & TF_ETASK) {
50 struct ETask *et = me->tc_UnionETask.tc_ETask;
52 et->et_TrapAlloc &= ~(1<<trapNum);
53 } else
54 me->tc_TrapAlloc &= ~(1<<trapNum);
57 AROS_LIBFUNC_EXIT
58 } /* FreeTrap */