2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 /*****************************************************************************
10 AROS_LH0(void, Disable,
13 struct ExecBase *, SysBase, 20, Exec)
16 This function disables the delivery of all interrupts until a matching
17 call to Enable() is done. This implies a Forbid(). Since the system
18 needs the regular delivery of all interrupts it is forbidden to disable
19 them for longer than ~250 microseconds.
21 THIS CALL IS VERY DANGEROUS!!!
23 Do not use it without thinking very well about it or better do not use
24 it at all. Most of the time you can live without it by using semaphores
27 Calls to Disable() nest, i.e. for each call to Disable() you need one
35 This function preserves all registers.
37 This function may be used from interrupts to disable all higher
38 priority interrupts. Lower priority interrupts are disabled anyway.
40 To prevent deadlocks calling Wait() in disabled state breaks the
41 disable - thus interrupts and taskswitches may happen again.
48 Forbid(), Permit(), Enable(), Wait()
51 This is literal rewrite of MC68000 version plus code to clear
56 ******************************************************************************/
66 .globl AROS_SLIB_ENTRY(Disable,Exec)
67 .type AROS_SLIB_ENTRY(Disable,Exec),@function
68 AROS_SLIB_ENTRY
(Disable
,Exec
):
72 /* disable amiga chipset interrupts */
75 /* disable external interrupts in PPC, must be executed in supervisor */
77 jsrlvo Supervisor
,base
78 /* we should come back here from _disab */
79 /* increment nesting count and return */
80 lbz scr
,IDNestCnt
(base
)
82 stb scr
,IDNestCnt
(base
)
89 andi. scr
,scr
,0xFFFF7FFF