libmetal
Toggle main menu visibility
Loading...
Searching...
No Matches
lib
condition.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016, Xilinx Inc. and Contributors. All rights reserved.
3
*
4
* SPDX-License-Identifier: BSD-3-Clause
5
*/
6
11
12
#ifndef __METAL_CONDITION__H__
13
#define __METAL_CONDITION__H__
14
15
#include <metal/mutex.h>
16
#include <metal/utilities.h>
17
18
#ifdef __cplusplus
19
extern
"C"
{
20
#endif
21
25
27
struct
metal_condition
;
28
33
static
inline
void
metal_condition_init
(
struct
metal_condition
*cv);
34
43
static
inline
int
metal_condition_signal
(
struct
metal_condition
*cv);
44
53
static
inline
int
metal_condition_broadcast
(
struct
metal_condition
*cv);
54
64
int
metal_condition_wait
(
struct
metal_condition
*cv,
metal_mutex_t
*
m
);
65
67
68
#ifdef __cplusplus
69
}
70
#endif
71
72
#include <metal/system/@PROJECT_SYSTEM@/condition.h>
73
74
#endif
/* __METAL_CONDITION__H__ */
metal_condition_signal
static int metal_condition_signal(struct metal_condition *cv)
Notify one waiter. Before calling this function, the caller should have acquired the mutex.
metal_condition_broadcast
static int metal_condition_broadcast(struct metal_condition *cv)
Notify all waiters. Before calling this function, the caller should have acquired the mutex.
metal_condition_wait
int metal_condition_wait(struct metal_condition *cv, metal_mutex_t *m)
Block until the condition variable is notified. Before calling this function, the caller should have ...
Definition
condition.c:14
metal_condition_init
static void metal_condition_init(struct metal_condition *cv)
Initialize a libmetal condition variable.
metal_condition
Definition
condition.h:25
metal_condition::m
metal_mutex_t * m
Definition
condition.h:26
metal_mutex_t
Definition
mutex.h:28
Generated on
for libmetal by
1.17.0