Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / .unmaintained / arm-all / exec / disable.c
blob099330dbf00e1305105b921cdfd05d5db13fa5c3
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Disable() - Stop interrupts from occurring.
6 Lang: english
7 */
9 #include <exec/types.h>
10 #include <exec/execbase.h>
11 #include <aros/libcall.h>
12 #include <asm/registers.h>
14 /*****************************************************************************/
15 #undef Exec
16 #ifdef UseExecstubs
17 # define Exec _Exec
18 #endif
20 /* NAME */
21 #include <proto/exec.h>
23 AROS_LH0(void, Disable,
25 /* LOCATION */
26 struct ExecBase *, SysBase, 20, Exec)
28 /* FUNCTION
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().
35 ***** WARNING *****
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
45 multitasking.
47 INPUTS
49 RESULT
50 Interrupts will be disabled AFTER this call returns.
52 NOTES
53 This function preserves all registers.
55 To prevent deadlocks calling Wait() in disabled state breaks
56 the disable - thus interrupts may happen again.
58 EXAMPLE
59 No you DEFINITATELY don't want to use this function.
61 BUGS
62 The only architecture that you can rely on the registers being
63 saved is on the Motorola mc68000 family.
65 SEE ALSO
66 Forbid(), Permit(), Enable(), Wait()
68 INTERNALS
69 This function must be replaced in the $(KERNEL) or $(ARCH)
70 directories in order to do some work.
72 HISTORY
74 ******************************************************************************/
76 #undef Exec
78 AROS_LIBFUNC_INIT
81 * Disable interrupts by masking all interrupts.
83 SetSR(0x000000C0, 0x000000C0);
85 SysBase->IDNestCnt++;
87 AROS_LIBFUNC_EXIT
88 } /* Disable() */