12#ifndef __METAL_CONDITION__H__
13#error "Include metal/condition.h instead of metal/generic/condition.h"
16#ifndef __METAL_GENERIC_CONDITION__H__
17#define __METAL_GENERIC_CONDITION__H__
19#include <metal/atomic.h>
22#include <metal/errno.h>
40#define METAL_CONDITION_INIT { ATOMIC_VAR_INIT(0), ATOMIC_VAR_INIT(0) }
#define atomic_fetch_add(OBJ, VAL)
Definition atomic.h:95
int atomic_int
Definition atomic.h:24
#define atomic_init(OBJ, VAL)
Definition atomic.h:52
atomic_uint atomic_uintptr_t
Definition atomic.h:26
#define EINVAL
Definition errno.h:43
static int metal_condition_signal(struct metal_condition *cv)
Notify one waiter. Before calling this function, the caller should have acquired the mutex.
static int metal_condition_broadcast(struct metal_condition *cv)
Notify all waiters. Before calling this function, the caller should have acquired the mutex.
static void metal_condition_init(struct metal_condition *cv)
Initialize a libmetal condition variable.