2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Disable() - Stop interrupts from occurring.
9 #include <exec/types.h>
10 #include <exec/execbase.h>
11 #include <aros/libcall.h>
12 #include <asm/registers.h>
14 /*****************************************************************************/
21 #include <proto/exec.h>
23 AROS_LH0(void, Disable
,
26 struct ExecBase
*, SysBase
, 20, Exec
)
29 This function will prevent interrupts from occuring. You can
30 start the interrupts again with a call to Enable().
32 Note that calls to Disable() nest, and for every call to
33 Disable() you need a matching call to Enable().
37 Using this function is considered very harmful, and it is
38 not recommended to use this function for ** ANY ** reason.
40 It is quite possible to either crash the system, or to prevent
41 normal activities (disk/port i/o) from occuring.
43 Note: As taskswitching is driven by the interrupts subsystem,
44 this function has the side effect of disabling
50 Interrupts will be disabled AFTER this call returns.
53 This function preserves all registers.
55 To prevent deadlocks calling Wait() in disabled state breaks
56 the disable - thus interrupts may happen again.
59 No you DEFINITATELY don't want to use this function.
62 The only architecture that you can rely on the registers being
63 saved is on the Motorola mc68000 family.
66 Forbid(), Permit(), Enable(), Wait()
69 This function must be replaced in the $(KERNEL) or $(ARCH)
70 directories in order to do some work.
74 ******************************************************************************/
81 * Disable interrupts by masking all interrupts.