minix/include/ddekit/condvar.h
Ben Gras 6a73e85ad1 retire _PROTOTYPE
. only good for obsolete K&R support
	. also remove a stray ansi.h and the proto cmd
2012-03-25 16:17:10 +02:00

31 lines
883 B
C

#ifndef _ddekit_condvar_h
#define _ddekit_condvar_h
/** \file ddekit/condvar.h */
#include <ddekit/ddekit.h>
#include <ddekit/lock.h>
struct ddekit_condvar;
typedef struct ddekit_condvar ddekit_condvar_t;
/* Initialize conditional variable. */
ddekit_condvar_t * ddekit_condvar_init(void);
/* Uninitialize conditional variable. */
void ddekit_condvar_deinit(ddekit_condvar_t *cvp);
/* Wait on a conditional variable. */
void ddekit_condvar_waiti(ddekit_condvar_t *cvp, ddekit_lock_t *mp);
/* Wait on a conditional variable at most until a timeout expires. (UNIMPL) */
int ddekit_condvar_wait_timed(ddekit_condvar_t *cvp, ddekit_lock_t *mp,
int timo);
/* Send signal to the next one waiting for condvar. */
void ddekit_condvar_signal(ddekit_condvar_t *cvp);
/* Send signal to all threads waiting for condvar. */
void ddekit_condvar_broadcast(ddekit_condvar_t *cvp);
#endif