etc/services - sync with NetBSD-8
[minix.git] / minix / include / ddekit / condvar.h
blob78f51d16650d8e649aecf3fd156dd0ac04f740c4
1 #ifndef _ddekit_condvar_h
2 #define _ddekit_condvar_h
4 /** \file ddekit/condvar.h */
5 #include <ddekit/ddekit.h>
7 #include <ddekit/lock.h>
9 struct ddekit_condvar;
10 typedef struct ddekit_condvar ddekit_condvar_t;
12 /* Initialize conditional variable. */
13 ddekit_condvar_t * ddekit_condvar_init(void);
15 /* Uninitialize conditional variable. */
16 void ddekit_condvar_deinit(ddekit_condvar_t *cvp);
18 /* Wait on a conditional variable. */
19 void ddekit_condvar_waiti(ddekit_condvar_t *cvp, ddekit_lock_t *mp);
21 /* Wait on a conditional variable at most until a timeout expires. (UNIMPL) */
22 int ddekit_condvar_wait_timed(ddekit_condvar_t *cvp, ddekit_lock_t *mp,
23 int timo);
25 /* Send signal to the next one waiting for condvar. */
26 void ddekit_condvar_signal(ddekit_condvar_t *cvp);
28 /* Send signal to all threads waiting for condvar. */
29 void ddekit_condvar_broadcast(ddekit_condvar_t *cvp);
31 #endif