2 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
5 Desc: Disable() - Stop interrupts from occurring.
11 #include <exec/types.h>
12 #include <exec/execbase.h>
13 #include <aros/libcall.h>
14 #include <aros/atomic.h>
15 #include <proto/kernel.h>
17 #include "exec_intern.h"
19 /*****************************************************************************/
26 #include <proto/exec.h>
28 AROS_LH0(void, Disable
,
31 struct ExecBase
*, SysBase
, 20, Exec
)
34 This function will prevent interrupts from occuring. You can
35 start the interrupts again with a call to Enable().
37 Note that calls to Disable() nest, and for every call to
38 Disable() you need a matching call to Enable().
42 Using this function is considered very harmful, and it is
43 not recommended to use this function for ** ANY ** reason.
45 It is quite possible to either crash the system, or to prevent
46 normal activities (disk/port i/o) from occuring.
48 Note: As taskswitching is driven by the interrupts subsystem,
49 this function has the side effect of disabling
55 Interrupts will be disabled AFTER this call returns.
58 This function preserves all registers.
60 To prevent deadlocks calling Wait() in disabled state breaks
61 the disable - thus interrupts may happen again.
64 No you DEFINITELY don't want to use this function.
67 The only architecture that you can rely on the registers being
68 saved is on the Motorola mc68000 family.
71 Forbid(), Permit(), Enable(), Wait()
74 This function must be replaced in the $(KERNEL) or $(ARCH)
75 directories in order to do some work.
77 ******************************************************************************/
83 D(bug("[Exec] Disable()\n");)
90 D(bug("[Exec] Disable: IDNESTCOUNT = %d\n", IDNESTCOUNT_GET
);)