home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / config / m68k-emul / semaphoreglue.s < prev    next >
Encoding:
Text File  |  1996-12-09  |  1.4 KB  |  53 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: semaphoreglue.s,v 1.2 1996/12/09 13:27:14 aros Exp $
  4.  
  5.     Desc: Semaphore glue functions
  6.     Lang: english
  7. */
  8.  
  9. #include "machine.i"
  10.  
  11. /*
  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.
  16. */
  17.  
  18.     .text
  19.     .balign 16
  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)
  24.     move.l    24(%sp),-(%sp)
  25.     move.l    24(%sp),-(%sp)
  26.     bsr.l    AROS_SLIB_ENTRY(ObtainSemaphore,Exec)
  27.     addq.w    #8,%sp
  28.     movem.l    (%sp)+,%d0-%d1/%a0-%a1
  29.     rts
  30.  
  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)
  35.     move.l    24(%sp),-(%sp)
  36.     move.l    24(%sp),-(%sp)
  37.     bsr.l    AROS_SLIB_ENTRY(ReleaseSemaphore,Exec)
  38.     addq.w    #8,%sp
  39.     movem.l    (%sp)+,%d0-%d1/%a0-%a1
  40.     rts
  41.  
  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)
  46.     move.l    24(%sp),-(%sp)
  47.     move.l    24(%sp),-(%sp)
  48.     bsr.l    AROS_SLIB_ENTRY(ObtainSemaphoreShared,Exec)
  49.     addq.w    #8,%sp
  50.     movem.l    (%sp)+,%d0-%d1/%a0-%a1
  51.     rts
  52.  
  53.