2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
5 Desc: Disable() - Stop interrupts from occurring.
8 /*****************************************************************************
11 #include <proto/exec.h>
13 AROS_LH0(void, Disable,
16 struct ExecBase *, SysBase, 20, Exec)
19 This function will prevent interrupts from occuring. You can
20 start the interrupts again with a call to Enable().
22 Note that calls to Disable() nest, and for every call to
23 Disable() you need a matching call to Enable().
27 Using this function is considered very harmful, and it is
28 not recommended to use this function for ** ANY ** reason.
30 It is quite possible to either crash the system, or to prevent
31 normal activities (disk/port i/o) from occuring.
33 Note: As taskswitching is driven by the interrupts subsystem,
34 this function has the side effect of disabling
40 Interrupts will be disabled AFTER this call returns.
43 This function preserves all registers.
45 To prevent deadlocks calling Wait() in disabled state breaks
46 the disable - thus interrupts may happen again.
49 No you DEFINITELY don't want to use this function.
52 The only architecture that you can rely on the registers being
53 saved is on the Motorola mc68000 family.
56 Forbid(), Permit(), Enable(), Wait()
59 This function must be replaced in the $(KERNEL) or $(ARCH)
60 directories in order to do some work.
62 ******************************************************************************/
63 #include "aros/m68k/asm.h"
67 .globl AROS_SLIB_ENTRY(Disable,Exec,20)
69 AROS_SLIB_ENTRY(Disable,Exec,20):
70 /* As we said above: ALL registers must be preserved! */
71 move.w #0x4000,0xdff09a
72 addq.b #1,IDNestCnt(%a6)