home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 171.lha / SupLib / semaphor.c < prev    next >
C/C++ Source or Header  |  1988-04-28  |  644b  |  43 lines

  1.  
  2. /*
  3.  *  The bindings for the following semaphore functions are incorrect
  4.  *  in the lattice/manx 1.2 clibs:
  5.  *
  6.  *    RemSemaphore
  7.  *    FindSemaphore
  8.  *    AddSemaphore
  9.  */
  10.  
  11. #include <local/typedefs.h>
  12.  
  13. #asm
  14.         public    _LVOFindSemaphore
  15.         public    _LVORemSemaphore
  16.         public    _SysBase
  17.         public    _RemSemaphore
  18.         public    _FindSemaphore
  19.  
  20. _RemSemaphore:    move.l    4(sp),A1
  21.         move.l    _SysBase,A6
  22.         jmp    _LVORemSemaphore(A6)
  23.  
  24. _FindSemaphore: move.l    4(sp),A1
  25.         move.l    _SysBase,A6
  26.         jmp    _LVOFindSemaphore(A6)
  27.  
  28. #endasm
  29.  
  30. extern EXECBASE *SysBase;
  31.  
  32. AddSemaphore(ss)
  33. SIGSEM *ss;
  34. {
  35.     InitSemaphore(ss);
  36.     Forbid();
  37.     Enqueue(&SysBase->SemaphoreList,ss);
  38.     Permit();
  39. }
  40.  
  41.  
  42.  
  43.