File dp_once.h¶
File List > doppler > dp_once.h
Go to the documentation of this file
#ifndef DP_ONCE_H
#define DP_ONCE_H
#ifdef _WIN32
typedef struct
{
void *opaque;
} dp_once_t;
#define DP_ONCE_INIT { 0 }
#else
#include <pthread.h>
typedef struct
{
pthread_once_t once;
} dp_once_t;
#define DP_ONCE_INIT { PTHREAD_ONCE_INIT }
#endif
#ifdef __cplusplus
extern "C"
{
#endif
void dp_once (dp_once_t *once, void (*fn) (void));
#ifdef __cplusplus
}
#endif
#endif /* DP_ONCE_H */