pthread_cond_init.c 257 B

1234567891011
  1. #include "pthread_impl.h"
  2. int pthread_cond_init(pthread_cond_t *restrict c, const pthread_condattr_t *restrict a)
  3. {
  4. *c = (pthread_cond_t){0};
  5. if (a) {
  6. c->_c_clock = a->__attr & 0x7fffffff;
  7. if (a->__attr>>31) c->_c_mutex = (void *)-1;
  8. }
  9. return 0;
  10. }