diff options
Diffstat (limited to 'drivers/windows/rw_lock_windows.cpp')
-rw-r--r-- | drivers/windows/rw_lock_windows.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/windows/rw_lock_windows.cpp b/drivers/windows/rw_lock_windows.cpp index edbd7b6a0f..615bcd22aa 100644 --- a/drivers/windows/rw_lock_windows.cpp +++ b/drivers/windows/rw_lock_windows.cpp @@ -30,14 +30,13 @@ #include "rw_lock_windows.h" -#include "os/memory.h" #include "error_macros.h" +#include "os/memory.h" #include <stdio.h> void RWLockWindows::read_lock() { AcquireSRWLockShared(&lock); - } void RWLockWindows::read_unlock() { @@ -47,18 +46,16 @@ void RWLockWindows::read_unlock() { Error RWLockWindows::read_try_lock() { - if (TryAcquireSRWLockShared(&lock)==0) { + if (TryAcquireSRWLockShared(&lock) == 0) { return ERR_BUSY; } else { return OK; } - } void RWLockWindows::write_lock() { AcquireSRWLockExclusive(&lock); - } void RWLockWindows::write_unlock() { @@ -67,34 +64,29 @@ void RWLockWindows::write_unlock() { } Error RWLockWindows::write_try_lock() { - if (TryAcquireSRWLockExclusive(&lock)==0) { + if (TryAcquireSRWLockExclusive(&lock) == 0) { return ERR_BUSY; } else { return OK; } } - RWLock *RWLockWindows::create_func_windows() { - return memnew( RWLockWindows ); + return memnew(RWLockWindows); } void RWLockWindows::make_default() { - create_func=create_func_windows; + create_func = create_func_windows; } - RWLockWindows::RWLockWindows() { InitializeSRWLock(&lock); } - RWLockWindows::~RWLockWindows() { - - } #endif |