2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
5 Desc: Enable() - Allow interrupts to occur after Disable().
8 /*****************************************************************************
11 #include <proto/exec.h>
13 AROS_LH0(void, Enable,
16 struct ExecBase *, SysBase, 21, Exec)
19 This function will allow interrupts to occur after they have
20 been disabled by Disable().
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
41 Interrupts will be enabled again when this call returns.
44 This function preserves all registers.
46 To prevent deadlocks calling Wait() in disabled state breaks
47 the disable - thus interrupts may happen again.
50 No you DEFINITATELY don't want to use this function.
53 The only architecture that you can rely on the registers being
54 saved is on the Motorola mc68000 family.
57 Forbid(), Permit(), Disable(), Wait()
60 This function must be replaced in the $(KERNEL) or $(ARCH)
61 directories in order to do some work.
63 ******************************************************************************/
64 #include "aros/m68k/asm.h"
68 .globl AROS_SLIB_ENTRY(Enable,Exec,21)
70 AROS_SLIB_ENTRY(Enable,Exec,21):
71 /* As we said above: ALL registers must be preserved! */
72 subq.b #1,%a6@(IDNestCnt)
74 move.w #0xc000,0xdff09a