summaryrefslogtreecommitdiff
path: root/drivers/windows/rw_lock_windows.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/windows/rw_lock_windows.h')
-rw-r--r--drivers/windows/rw_lock_windows.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/windows/rw_lock_windows.h b/drivers/windows/rw_lock_windows.h
new file mode 100644
index 0000000000..c089c31c33
--- /dev/null
+++ b/drivers/windows/rw_lock_windows.h
@@ -0,0 +1,37 @@
+#ifndef RWLOCKWINDOWS_H
+#define RWLOCKWINDOWS_H
+
+#if defined(WINDOWS_ENABLED)
+
+#include <windows.h>
+#include "os/rw_lock.h"
+
+class RWLockWindows : public RWLock {
+
+
+ SRWLOCK lock;
+
+ static RWLock *create_func_windows();
+
+public:
+
+ virtual void read_lock();
+ virtual void read_unlock();
+ virtual Error read_try_lock();
+
+ virtual void write_lock();
+ virtual void write_unlock();
+ virtual Error write_try_lock();
+
+ static void make_default();
+
+ RWLockWindows();
+
+ ~RWLockWindows();
+
+};
+
+#endif
+
+
+#endif // RWLOCKWINDOWS_H