zephyr/lib/libc/common/include/machine/_threads.h
Christopher Friedt 4c58c6b4c4 libc: common: support for C11 call_once()
Add C11 call_once() support to go with C11 threads
and mutexes.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-14 18:23:42 +09:00

33 lines
765 B
C

/*
* Copyright (c) 2023, Meta
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_LIB_LIBC_COMMON_INCLUDE_MACHINE__THREADS_H_
#define ZEPHYR_LIB_LIBC_COMMON_INCLUDE_MACHINE__THREADS_H_
#ifdef __cplusplus
extern "C" {
#endif
#define ONCE_FLAG_INIT \
{ \
1, 0 \
}
typedef int cnd_t;
typedef int mtx_t;
typedef int thrd_t;
typedef int tss_t;
typedef struct {
int is_initialized;
int init_executed;
} once_flag;
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_LIB_LIBC_COMMON_INCLUDE_MACHINE__THREADS_H_ */