78 #ifndef GOOGLE_PROTOBUF_STUBS_ONCE_H__
79 #define GOOGLE_PROTOBUF_STUBS_ONCE_H__
87 #ifdef GOOGLE_PROTOBUF_NO_THREAD_SAFETY
91 #define GOOGLE_PROTOBUF_ONCE_INIT false
93 inline void GoogleOnceInit(ProtobufOnceType* once,
void (*init_func)()) {
100 template <
typename Arg>
101 inline void GoogleOnceInit(ProtobufOnceType* once,
void (*init_func)(Arg*),
119 #define GOOGLE_PROTOBUF_ONCE_INIT ::google::protobuf::ONCE_STATE_UNINITIALIZED
131 template <
typename Arg>
140 #endif // GOOGLE_PROTOBUF_NO_THREAD_SAFETY
151 void Init(
void (*func_with_arg)(T*), T* arg) {
152 GoogleOnceInit<T>(&this->
state_,
160 #define GOOGLE_PROTOBUF_DECLARE_ONCE(NAME) \
161 ::google::protobuf::ProtobufOnceType NAME = GOOGLE_PROTOBUF_ONCE_INIT
166 #endif // GOOGLE_PROTOBUF_STUBS_ONCE_H__
LIBPROTOBUF_EXPORT void GoogleOnceInitImpl(ProtobufOnceType *once, Closure *closure)
ProtobufOnceType state_
Definition: once.h:157
void GoogleOnceInit(ProtobufOnceType *once, void(*init_func)())
Definition: once.h:124
Atomic32 Acquire_Load(volatile const Atomic32 *ptr)
Definition: atomicops_internals_arm64_gcc.h:167
#define GOOGLE_PROTOBUF_ONCE_INIT
Definition: once.h:119
internal::AtomicWord ProtobufOnceType
Definition: once.h:117
GoogleOnceDynamic()
Definition: once.h:144
intptr_t AtomicWord
Definition: atomicops.h:81
#define LIBPROTOBUF_EXPORT
Definition: common.h:105
internal::NamedArg< char > arg(StringRef name, const T &arg)
Definition: format.h:3248
void Init(void(*func_with_arg)(T *), T *arg)
Definition: once.h:151
Definition: BnetFileGenerator.h:47