2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: i386unix version of Disable()
9 #include <exec/tasks.h>
10 #include <exec/execbase.h>
11 #include <aros/libcall.h>
12 #include <aros/atomic.h>
13 #include <proto/exec.h>
18 extern sigset_t sig_int_mask
; /* Mask of sig_t that are ints, not traps */
24 AROS_LH0(void, Disable
,
25 struct ExecBase
*, SysBase
, 20, Exec
)
30 sigprocmask(SIG_BLOCK
, &sig_int_mask
, NULL
);
32 AROS_ATOMIC_INC(SysBase
->IDNestCnt
);
34 if (SysBase
->IDNestCnt
< 0)
36 /* If we get here we have big trouble. Someone called
37 1x Disable() and 2x Enable(). IDNestCnt < 0 would
38 mean enable interrupts, but the caller of Disable
39 relies on the function to disable them, so we don´t
40 do anything here (or maybe a deadend alert?) */