Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
pthread_once.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2014 René Kijewski <rene.kijewski@fu-berlin.de>
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
19
25
typedef
struct
{
26
int
is_initialized
;
27
int
init_executed
;
28
}
pthread_once_t
;
29
36
#define PTHREAD_ONCE_INIT { 1, 0 }
37
47
int
pthread_once
(
pthread_once_t
*once_control,
void
(*init_routine)(
void
));
48
49
#ifdef __cplusplus
50
}
51
#endif
52
pthread_once
int pthread_once(pthread_once_t *once_control, void(*init_routine)(void))
Helper function that ensures that init_routine is called at once.
pthread_once_t
Datatype to supply to pthread_once().
Definition
pthread_once.h:25
pthread_once_t::is_initialized
int is_initialized
initialized
Definition
pthread_once.h:26
pthread_once_t::init_executed
int init_executed
init function executed
Definition
pthread_once.h:27
Generated on Fri Oct 30 2026 12:40:18 by
1.13.2