2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
9 #include "aros/m68k/asm.h"
12 The following functions are guaranteed to preserve
13 all registers. But I don't want to write them completely
14 in assembly - C is generally more readable.
15 So I use those stubs to preserve the registers.
21 .globl AROS_SLIB_ENTRY(ObtainSemaphore,Exec)
22 AROS_SLIB_ENTRY(ObtainSemaphore,Exec):
23 movem.l %d0-%d1/%a0-%a1,-(%sp)
27 bsr.l AROS_CSYMNAME(_Exec_ObtainSemaphore)@PLTPC
29 jbsr AROS_CSYMNAME(_Exec_ObtainSemaphore)
32 movem.l (%sp)+,%d0-%d1/%a0-%a1
35 .globl AROS_SLIB_ENTRY(ReleaseSemaphore,Exec)
36 AROS_SLIB_ENTRY(ReleaseSemaphore,Exec):
37 movem.l %d0-%d1/%a0-%a1,-(%sp)
41 bsr.l AROS_CSYMNAME(_Exec_ReleaseSemaphore)@PLTPC
43 jbsr AROS_CSYMNAME(_Exec_ReleaseSemaphore)
46 movem.l (%sp)+,%d0-%d1/%a0-%a1
49 .globl AROS_SLIB_ENTRY(ObtainSemaphoreShared,Exec)
50 AROS_SLIB_ENTRY(ObtainSemaphoreShared,Exec):
51 movem.l %d0-%d1/%a0-%a1,-(%sp)
55 bsr.l AROS_CSYMNAME(_Exec_ObtainSemaphoreShared)@PLTPC
57 jbsr AROS_CSYMNAME(_Exec_ObtainSemaphoreShared)
60 movem.l (%sp)+,%d0-%d1/%a0-%a1
63 .globl AROS_SLIB_ENTRY(Disable,Exec)
65 AROS_SLIB_ENTRY(Disable,Exec):
66 movem.l %d0-%d1/%a0-%a1,-(%sp)
69 bsr.l AROS_CSYMNAME(_Exec_Disable)@PLTPC
71 jbsr AROS_CSYMNAME(_Exec_Disable)
74 movem.l (%sp)+,%d0-%d1/%a0-%a1
77 .globl AROS_SLIB_ENTRY(Enable,Exec)
78 AROS_SLIB_ENTRY(Enable,Exec):
79 movem.l %d0-%d1/%a0-%a1,-(%sp)
82 bsr.l AROS_CSYMNAME(_Exec_Enable)@PLTPC
84 jbsr AROS_CSYMNAME(_Exec_Enable)
87 movem.l (%sp)+,%d0-%d1/%a0-%a1
90 .globl AROS_SLIB_ENTRY(Forbid,Exec)
91 AROS_SLIB_ENTRY(Forbid,Exec):
92 movem.l %d0-%d1/%a0-%a1,-(%sp)
95 bsr.l AROS_CSYMNAME(_Exec_Forbid)@PLTPC
97 jbsr AROS_CSYMNAME(_Exec_Forbid)
100 movem.l (%sp)+,%d0-%d1/%a0-%a1
103 .globl AROS_SLIB_ENTRY(Permit,Exec)
104 AROS_SLIB_ENTRY(Permit,Exec):
105 movem.l %d0-%d1/%a0-%a1,-(%sp)
108 bsr.l AROS_CSYMNAME(_Exec_Permit)@PLTPC
110 jbsr AROS_CSYMNAME(_Exec_Permit)
113 movem.l (%sp)+,%d0-%d1/%a0-%a1