2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
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 .type AROS_SLIB_ENTRY(ObtainSemaphore,Exec),@function
23 AROS_SLIB_ENTRY
(ObtainSemaphore
,Exec
):
24 movem.
l %d0-
%d1
/%a0-
%a1
,-(%sp
)
28 bsr.
l AROS_CSYMNAME
(_Exec_ObtainSemaphore
)@PLTPC
30 jbsr AROS_CSYMNAME
(_Exec_ObtainSemaphore
)
33 movem.
l (%sp
)+,%d0-
%d1
/%a0-
%a1
36 .globl AROS_SLIB_ENTRY(ReleaseSemaphore,Exec)
37 .type AROS_SLIB_ENTRY(ReleaseSemaphore,Exec),@function
38 AROS_SLIB_ENTRY
(ReleaseSemaphore
,Exec
):
39 movem.
l %d0-
%d1
/%a0-
%a1
,-(%sp
)
43 bsr.
l AROS_CSYMNAME
(_Exec_ReleaseSemaphore
)@PLTPC
45 jbsr AROS_CSYMNAME
(_Exec_ReleaseSemaphore
)
48 movem.
l (%sp
)+,%d0-
%d1
/%a0-
%a1
51 .globl AROS_SLIB_ENTRY(ObtainSemaphoreShared,Exec)
52 .type AROS_SLIB_ENTRY(ObtainSemaphoreShared,Exec),@function
53 AROS_SLIB_ENTRY
(ObtainSemaphoreShared
,Exec
):
54 movem.
l %d0-
%d1
/%a0-
%a1
,-(%sp
)
58 bsr.
l AROS_CSYMNAME
(_Exec_ObtainSemaphoreShared
)@PLTPC
60 jbsr AROS_CSYMNAME
(_Exec_ObtainSemaphoreShared
)
63 movem.
l (%sp
)+,%d0-
%d1
/%a0-
%a1
66 .globl AROS_SLIB_ENTRY(Disable,Exec)
67 .type AROS_SLIB_ENTRY(Disable,Exec),@function
68 AROS_SLIB_ENTRY
(Disable
,Exec
):
69 movem.
l %d0-
%d1
/%a0-
%a1
,-(%sp
)
72 bsr.
l AROS_CSYMNAME
(_Exec_Disable
)@PLTPC
74 jbsr AROS_CSYMNAME
(_Exec_Disable
)
77 movem.
l (%sp
)+,%d0-
%d1
/%a0-
%a1
80 .globl AROS_SLIB_ENTRY(Enable,Exec)
81 .type AROS_SLIB_ENTRY(Enable,Exec),@function
82 AROS_SLIB_ENTRY
(Enable
,Exec
):
83 movem.
l %d0-
%d1
/%a0-
%a1
,-(%sp
)
86 bsr.
l AROS_CSYMNAME
(_Exec_Enable
)@PLTPC
88 jbsr AROS_CSYMNAME
(_Exec_Enable
)
91 movem.
l (%sp
)+,%d0-
%d1
/%a0-
%a1
94 .globl AROS_SLIB_ENTRY(Forbid,Exec)
95 .type AROS_SLIB_ENTRY(Forbid,Exec),@function
96 AROS_SLIB_ENTRY
(Forbid
,Exec
):
97 movem.
l %d0-
%d1
/%a0-
%a1
,-(%sp
)
100 bsr.
l AROS_CSYMNAME
(_Exec_Forbid
)@PLTPC
102 jbsr AROS_CSYMNAME
(_Exec_Forbid
)
105 movem.
l (%sp
)+,%d0-
%d1
/%a0-
%a1
108 .globl AROS_SLIB_ENTRY(Permit,Exec)
109 .type AROS_SLIB_ENTRY(Permit,Exec),@function
110 AROS_SLIB_ENTRY
(Permit
,Exec
):
111 movem.
l %d0-
%d1
/%a0-
%a1
,-(%sp
)
114 bsr.
l AROS_CSYMNAME
(_Exec_Permit
)@PLTPC
116 jbsr AROS_CSYMNAME
(_Exec_Permit
)
119 movem.
l (%sp
)+,%d0-
%d1
/%a0-
%a1