- private_condvar_t *this = malloc_thing(private_condvar_t);
-
- this->public.wait = (void(*)(condvar_t*, mutex_t *mutex))_wait;
- this->public.timed_wait = (bool(*)(condvar_t*, mutex_t *mutex, u_int timeout))timed_wait;
- this->public.timed_wait_abs = (bool(*)(condvar_t*, mutex_t *mutex, timeval_t time))timed_wait_abs;
- this->public.signal = (void(*)(condvar_t*))_signal;
- this->public.broadcast = (void(*)(condvar_t*))broadcast;
- this->public.destroy = (void(*)(condvar_t*))condvar_destroy;
+ private_condvar_t *this;
+
+ INIT(this,
+ .public = {
+ .wait = (void*)_wait_,
+ .timed_wait = (void*)_timed_wait,
+ .timed_wait_abs = (void*)_timed_wait_abs,
+ .signal = _signal_,
+ .broadcast = _broadcast,
+ .destroy = _condvar_destroy,
+ }
+ );