aboutsummaryrefslogtreecommitdiff
path: root/port/port_posix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'port/port_posix.cc')
-rw-r--r--port/port_posix.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/port/port_posix.cc b/port/port_posix.cc
index c44cc99..5ba127a 100644
--- a/port/port_posix.cc
+++ b/port/port_posix.cc
@@ -46,5 +46,9 @@ void CondVar::SignalAll() {
PthreadCall("broadcast", pthread_cond_broadcast(&cv_));
}
+void InitOnce(OnceType* once, void (*initializer)()) {
+ PthreadCall("once", pthread_once(once, initializer));
+}
+
} // namespace port
} // namespace leveldb