summaryrefslogtreecommitdiff
path: root/drivers/windows/rw_lock_windows.h
blob: c089c31c331ffeb6173f53fce62f1e92c036dea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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