summaryrefslogtreecommitdiff
path: root/libodb/odb/details/win32/once.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libodb/odb/details/win32/once.cxx')
-rw-r--r--libodb/odb/details/win32/once.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/libodb/odb/details/win32/once.cxx b/libodb/odb/details/win32/once.cxx
new file mode 100644
index 0000000..7b98d80
--- /dev/null
+++ b/libodb/odb/details/win32/once.cxx
@@ -0,0 +1,26 @@
+// file : odb/details/win32/once.cxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#include <odb/details/win32/windows.hxx>
+#include <odb/details/win32/once.hxx>
+#include <odb/details/win32/once-init.hxx>
+
+namespace odb
+{
+ namespace details
+ {
+ CRITICAL_SECTION win32_once_cs_;
+
+ void
+ once_process_start ()
+ {
+ InitializeCriticalSection (&win32_once_cs_);
+ }
+
+ void
+ once_process_end (bool)
+ {
+ DeleteCriticalSection (&win32_once_cs_);
+ }
+ }
+}