#include "pthread_impl.h" #include int cnd_init(cnd_t * c) { *c = (cnd_t) { 0 }; static int dum_int; __cnd_t* ret = __cnd_getref(c, 0, &dum_int); /* do the bookkeeping for this uncontended case */ __cnd_unref(ret); --ret->wts; return ret ? thrd_success : thrd_nomem; }