feat(thread): implement CSRWLock::Enter and CSRWLock::Leave for windows (#1)

This commit is contained in:
fallenoak 2020-12-01 17:40:37 -06:00 committed by GitHub
parent 8210d368f6
commit 2fb9fd284c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 6 deletions

View file

@ -3,6 +3,10 @@
#include <cstdint>
#if defined(WHOA_PLATFORM_WIN)
#include "storm/thread/win/SRWLock.hpp"
#endif
#if defined(WHOA_PLATFORM_MAC) || defined(WHOA_PLATFORM_LINUX)
#include <pthread.h>
#endif
@ -10,8 +14,8 @@
class CSRWLock {
public:
// Member variables
#ifdef WHOA_PLATFORM_WIN
char m_opaqueData[12];
#if defined(WHOA_PLATFORM_WIN)
SRWLock::SURWLOCK m_opaqueData;
#endif
#if defined(WHOA_PLATFORM_MAC) || defined(WHOA_PLATFORM_LINUX)