Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / .unmaintained / m68k-emul / permit.s
blobb6da25254b0096b689c73b90bc0b612bd7ea7dd1
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Exec function Permit
6 Lang: english
7 */
9 /******************************************************************************
11 NAME
12 AROS_LH0(void, Permit,
14 LOCATION
15 struct ExecBase *, SysBase, 23, Exec)
17 FUNCTION
18 This function activates the dispatcher again after a call to Permit().
20 INPUTS
22 RESULT
24 NOTES
25 This function preserves all registers.
26 EXAMPLE
28 BUGS
30 SEE ALSO
31 Forbid(), Disable(), Enable()
33 INTERNALS
35 HISTORY
37 ******************************************************************************/
39 #include "machine.i"
41 .text
42 .balign 16
43 .globl AROS_SLIB_ENTRY(Permit,Exec)
44 .type AROS_SLIB_ENTRY(Permit,Exec),@function
45 AROS_SLIB_ENTRY(Permit,Exec):
46 #if !UseRegisterArgs
47 /* Preserve used registers */
48 move.l %a6,-(%sp)
50 /* Get SysBase */
51 move.l 8(%sp),%a6
52 #endif
54 /* Decrement and test TDNestCnt */
55 subq.b #1,TDNestCnt(%a6)
56 jbpl .noswch
58 /* return if there are no delayed switches pending. */
59 btst #7,AttnResched+1(%a6)
60 jbeq .noswch
62 /* if IDNestCnt is not -1 taskswitches are still forbidden */
63 tst.b IDNestCnt(%a6)
64 jbpl .noswch
66 /* Unset delayed switch bit and do the delayed switch */
67 bclr #7,AttnResched+1(%a6)
68 #if !UseRegisterArgs
69 move.l %a6,-(%sp)
70 #endif
71 jsr Switch(%a6)
72 #if !UseRegisterArgs
73 addq #4,%sp
74 #endif
76 /* all done. */
77 .noswch:
78 #if !UseRegisterArgs
79 move.l (%sp)+,%a6
80 #endif
81 rts