home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / E / TFF-A32R.LZX / AmigaE3.2a / RkrmSrc / Exec_Library / Semaphores / semaphore.e
Encoding:
Text File  |  1996-08-29  |  290 b   |  14 lines

  1. -> semaphore.e - Exec semaphore example
  2.  
  3. MODULE 'exec/semaphores'
  4.  
  5. PROC main()
  6.   DEF lockSemaphore:ss
  7.   InitSemaphore(lockSemaphore)
  8.   ObtainSemaphore(lockSemaphore)   -> Task now owns the semaphore.
  9.  
  10.   -> ...
  11.  
  12.   ReleaseSemaphore(lockSemaphore)  -> Task has released the semaphore.
  13. ENDPROC
  14.