lock.h 407 B

1234567891011121314151617181920212223242526272829
  1. #if !defined(_RESEARCH_SOURCE) && !defined(_PLAN9_SOURCE)
  2. This header file is an extension of ANSI/POSIX
  3. #endif
  4. #ifndef __LOCK_H
  5. #define __LOCK_H
  6. #pragma lib "ape/libap.a"
  7. #include <u.h>
  8. typedef struct
  9. {
  10. int val;
  11. } Lock;
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. extern void lock(Lock*);
  16. extern void unlock(Lock*);
  17. extern int canlock(Lock*);
  18. extern int tas(int*);
  19. #ifdef __cplusplus
  20. }
  21. #endif
  22. #endif