pthread_once.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 RenĂ© Kijewski <rene.kijewski@fu-berlin.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
17 #ifndef PTHREAD_ONCE_H
18 #define PTHREAD_ONCE_H
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
27 typedef volatile int pthread_once_t;
28 
34 #define PTHREAD_ONCE_INIT 0
35 
45 int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif /* PTHREAD_ONCE_H */
52 
pthread_once_t
volatile int pthread_once_t
Datatype to supply to pthread_once().
Definition: pthread_once.h:27
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.