pthread_cond.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __PTHREAD_COND_H__
  2. #define __PTHREAD_COND_H__
  3. #include <pthread.h>
  4. #include <sys/time.h>
  5. #include <rtthread.h>
  6. struct pthread_cond
  7. {
  8. pthread_condattr_t attr;
  9. struct rt_semaphore sem;
  10. };
  11. typedef struct pthread_cond pthread_cond_t;
  12. int pthread_condattr_destroy(pthread_condattr_t *attr);
  13. int pthread_condattr_init(pthread_condattr_t *attr);
  14. /* ADVANCED REALTIME feature in IEEE Std 1003.1, 2004 Edition */
  15. int pthread_condattr_getclock(const pthread_condattr_t *attr,
  16. clockid_t *clock_id);
  17. int pthread_condattr_setclock(pthread_condattr_t *attr,
  18. clockid_t clock_id);
  19. int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
  20. int pthread_cond_destroy(pthread_cond_t *cond);
  21. int pthread_cond_broadcast(pthread_cond_t *cond);
  22. int pthread_cond_signal(pthread_cond_t *cond);
  23. int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
  24. int pthread_cond_timedwait(pthread_cond_t *cond,
  25. pthread_mutex_t * mutex,
  26. const struct timespec *abstime);
  27. #endif