1
0

qlock.h 474 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef __QLOCK_H_
  2. #define __QLOCK_H
  3. #ifndef _QLOCK_EXTENSION
  4. This header file is an extension to ANSI/POSIX
  5. #endif
  6. #pragma lib "/$M/lib/ape/lib9.a"
  7. typedef struct QLp QLp;
  8. struct QLp
  9. {
  10. int inuse;
  11. QLp *next;
  12. char state;
  13. };
  14. typedef
  15. struct QLock
  16. {
  17. Lock lock;
  18. int locked;
  19. QLp *head;
  20. QLp *tail;
  21. } QLock;
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. extern void qlock(QLock*);
  26. extern void qunlock(QLock*);
  27. extern int canqlock(QLock*);
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif