2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Semaphore glue functions
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.
20 .globl AROS_SLIB_ENTRY(_ObtainSemaphore,Exec)
21 .type AROS_SLIB_ENTRY(_ObtainSemaphore,Exec),@function
22 AROS_SLIB_ENTRY
(_ObtainSemaphore
,Exec
):
23 movem.
l %d0-
%d1
/%a0-
%a1
,-(%sp
)
26 bsr.
l AROS_SLIB_ENTRY
(ObtainSemaphore
,Exec
)
28 movem.
l (%sp
)+,%d0-
%d1
/%a0-
%a1
31 .globl AROS_SLIB_ENTRY(_ReleaseSemaphore,Exec)
32 .type AROS_SLIB_ENTRY(_ReleaseSemaphore,Exec),@function
33 AROS_SLIB_ENTRY
(_ReleaseSemaphore
,Exec
):
34 movem.
l %d0-
%d1
/%a0-
%a1
,-(%sp
)
37 bsr.
l AROS_SLIB_ENTRY
(ReleaseSemaphore
,Exec
)
39 movem.
l (%sp
)+,%d0-
%d1
/%a0-
%a1
42 .globl AROS_SLIB_ENTRY(_ObtainSemaphoreShared,Exec)
43 .type AROS_SLIB_ENTRY(_ObtainSemaphoreShared,Exec),@function
44 AROS_SLIB_ENTRY
(_ObtainSemaphoreShared
,Exec
):
45 movem.
l %d0-
%d1
/%a0-
%a1
,-(%sp
)
48 bsr.
l AROS_SLIB_ENTRY
(ObtainSemaphoreShared
,Exec
)
50 movem.
l (%sp
)+,%d0-
%d1
/%a0-
%a1