home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 10 / Fresh_Fish_10_2352.bin / new / comm / tcp / netinput / source / unixsem.h < prev   
Encoding:
C/C++ Source or Header  |  1995-03-05  |  941 b   |  49 lines

  1. #ifndef __UNIXSEM_H
  2. #define __UNIXSEM_H
  3.  
  4. /*
  5. ** $VER: unixsem.c 1.0 (05 Mar 95)
  6. **
  7. ** UNIX like counting semaphores for the AMIGA
  8. **
  9. ** (C) Copyright 1995
  10. **     Marius Gröger
  11. **
  12. ** $HISTORY:
  13. **
  14. ** 05 Mar 1995 : 001.000 :  created
  15. */
  16.  
  17. #ifndef DOS_DOS_H
  18. #include <dos/dos.h>
  19. #endif
  20.  
  21. #ifndef EXEC_SEMAPHORES_H
  22. #include <exec/semaphores.h>
  23. #endif
  24.  
  25.    /*
  26.    ** PRIVATE data structure.
  27.    ** You have _NEVER_ seen this, have you ?
  28.    */
  29. typedef struct
  30. {
  31.    struct SignalSemaphore sem_Lock;
  32.    LONG                   sem_Count;
  33.    struct MinList         sem_WaitingSpace;
  34.    ULONG                  sem_SigMask;
  35. }
  36. CountSemaphore;
  37.  
  38.    /* specify the default exec signal to use */
  39. #define UNIXSEM_SIGMASK SIGBREAKF_CTRL_E
  40.  
  41.    /* function call interface */
  42. extern VOID sinit(CountSemaphore *sem, ULONG sigmask);
  43. extern VOID sset(CountSemaphore *sem, LONG val);
  44. extern VOID ssignal(CountSemaphore *sem);
  45. extern VOID swait(CountSemaphore *sem);
  46.  
  47. #endif
  48.  
  49.