home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / semaphores / src / remsemaphore.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-16  |  1023 b   |  60 lines

  1. /*
  2.     $Id$
  3.     $Log$
  4.     Desc:
  5.     Lang: english
  6. */
  7. #include "exec_intern.h"
  8.  
  9. /*****************************************************************************
  10.  
  11.     NAME */
  12.     #include <exec/semaphores.h>
  13.     #include <clib/exec_protos.h>
  14.  
  15.     __AROS_LH1(void, RemSemaphore,
  16.  
  17. /*  SYNOPSIS */
  18.     __AROS_LA(struct SignalSemaphore *, sigSem, A0),
  19.  
  20. /*  LOCATION */
  21.     struct ExecBase *, SysBase, 101, Exec)
  22.  
  23. /*  FUNCTION
  24.     Removes a semaphore from the system public semaphore list.
  25.  
  26.     INPUTS
  27.     sigSem - Pointer to semaphore structure
  28.  
  29.     RESULT
  30.  
  31.     NOTES
  32.     Semaphores are shared between the tasks that use them and must
  33.     therefore lie in public (or at least shared) memory.
  34.  
  35.     EXAMPLE
  36.  
  37.     BUGS
  38.  
  39.     SEE ALSO
  40.  
  41.     INTERNALS
  42.  
  43.     HISTORY
  44.  
  45. *****************************************************************************/
  46. {
  47.     __AROS_FUNC_INIT
  48.  
  49.     /* Arbitrate for the semaphore list */
  50.     Forbid();
  51.  
  52.     /* Remove the semaphore */
  53.     Remove(&sigSem->ss_Link);
  54.  
  55.     /* All done. */
  56.     Permit();
  57.     __AROS_FUNC_EXIT
  58. } /* RemSemaphore */
  59.  
  60.