Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / .unmaintained / ppc-native / exec / permit.s
blob8d46b74294bfa08d7c0ff23f077668318e1594b2
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 /*****************************************************************************
8 NAME
10 AROS_LH0(void, Permit,
12 LOCATION
13 struct ExecBase *, SysBase, 23, Exec)
15 FUNCTION
16 This function activates the dispatcher again after a call to Permit().
18 INPUTS
20 RESULT
22 NOTES
23 This function preserves all registers.
25 EXAMPLE
27 BUGS
29 SEE ALSO
30 Forbid(), Disable(), Enable()
32 INTERNALS
34 HISTORY
36 ******************************************************************************/
38 #include "machine.i"
40 .text
41 .balign 4
42 .globl AROS_SLIB_ENTRY(Permit,Exec)
43 .type AROS_SLIB_ENTRY(Permit,Exec),@function
44 AROS_SLIB_ENTRY(Permit,Exec):
45 subr
46 push scr
48 /* decrement nesting count and return if there are Forbid()s left */
49 lbz scr,TDNestCnt(base)
50 subic. scr,scr,1
51 stw scr,TDNestCnt(base)
52 bge end
54 /* return if there are no delayed switches pending. */
55 lwz scr,AttnResched+1(base)
56 cmpdi scr,0
57 beq end
59 /* if IDNestCnt is not -1 taskswitches are still forbidden */
60 lwz scr,IDNestCnt(base)
61 cmpdi scr,0
62 beq end
64 /* Unset delayed switch bit and do the delayed switch */
65 lwz scr,0x12b(base)
66 andi. scr,scr,0x7f
67 sth scr,0x12b(base)
68 jsrlvo Switch,base
70 /* all done. */
72 end: pop scr
73 rts