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
17extern "C" {
18#endif
19
25typedef struct {
29
36#define PTHREAD_ONCE_INIT { 1, 0 }
37
47int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
48
49#ifdef __cplusplus
50}
51#endif
52
int pthread_once(pthread_once_t *once_control, void(*init_routine)(void))
Helper function that ensures that init_routine is called at once.
Datatype to supply to pthread_once().
int is_initialized
initialized
int init_executed
init function executed