unpthread.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. /* Our own header for the programs that use threads.
  2. Include this file, instead of "unp.h". */
  3. #ifndef __unp_pthread_h
  4. #define __unp_pthread_h
  5. #include "unp.h"
  6. void Pthread_create(pthread_t *, const pthread_attr_t *,
  7. void * (*)(void *), void *);
  8. void Pthread_join(pthread_t, void **);
  9. void Pthread_detach(pthread_t);
  10. void Pthread_kill(pthread_t, int);
  11. void Pthread_mutexattr_init(pthread_mutexattr_t *);
  12. void Pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
  13. void Pthread_mutex_init(pthread_mutex_t *, pthread_mutexattr_t *);
  14. void Pthread_mutex_lock(pthread_mutex_t *);
  15. void Pthread_mutex_unlock(pthread_mutex_t *);
  16. void Pthread_cond_broadcast(pthread_cond_t *);
  17. void Pthread_cond_signal(pthread_cond_t *);
  18. void Pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *);
  19. void Pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *,
  20. const struct timespec *);
  21. void Pthread_key_create(pthread_key_t *, void (*)(void *));
  22. void Pthread_setspecific(pthread_key_t, const void *);
  23. void Pthread_once(pthread_once_t *, void (*)(void));
  24. #endif /* __unp_pthread_h */