2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Exec function Disable
8 #define timeval sys_timeval
11 #include <exec/execbase.h>
15 /******************************************************************************
18 #include <proto/exec.h>
20 AROS_LH0(void, Disable
,
23 struct ExecBase
*, SysBase
, 20, Exec
)
26 This function disables the delivery of all interrupts until a
27 matching call to Enable() is done. This implies a Forbid(). Since
28 the system needs the regular delivery of all interrupts it is
29 forbidden to disable them for longer than ~250 microseconds.
31 THIS CALL IS VERY DANGEROUS!!!
33 Do not use it without thinking very well about it or better do not
34 use it at all. Most of the time you can live without it by using
35 semaphores or similar.
37 Calls to Disable() nest, i.e. for each call to Disable() you need
48 You should not use this function as a cheap way to avoid
51 If you can, use Forbid() instead.
53 This function preserves all registers.
55 This function may be used from interrupts to disable all higher
56 priority interrupts. Lower priority interrupts are disabled anyway.
58 To prevent deadlocks calling Wait() in disabled state breaks the
59 disable - thus interrupts and taskswitches may happen again.
66 Enable(), Forbid(), Permit(), Wait()
72 ******************************************************************************/
76 SysBase
->IDNestCnt
++;
85 sigprocmask (SIG_BLOCK
, &set
, NULL
);