chore(build): make platform and arch defines more specific

This commit is contained in:
fallenoak 2020-11-24 17:29:31 -06:00
parent 5e2001a164
commit be391c6592
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
12 changed files with 41 additions and 41 deletions

View file

@ -2,11 +2,11 @@
SEvent::SEvent(int32_t manualReset, int32_t initialValue)
: SSyncObject() {
#if defined(PLATFORM_WIN)
#if defined(WHOA_PLATFORM_WIN)
this->m_opaqueData = CreateEventA(nullptr, manualReset, initialValue, nullptr);
#endif
#if defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
#if defined(WHOA_PLATFORM_MAC) || defined(WHOA_PLATFORM_LINUX)
this->m_int0 = 2 - (manualReset >= 1);
this->m_value = initialValue;
@ -15,11 +15,11 @@ SEvent::SEvent(int32_t manualReset, int32_t initialValue)
}
int32_t SEvent::Reset() {
#if defined(PLATFORM_WIN)
#if defined(WHOA_PLATFORM_WIN)
return ResetEvent(this->m_opaqueData);
#endif
#if defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
#if defined(WHOA_PLATFORM_MAC) || defined(WHOA_PLATFORM_LINUX)
pthread_mutex_lock(&this->m_mutex);
this->m_value = 0;
pthread_mutex_unlock(&this->m_mutex);
@ -29,11 +29,11 @@ int32_t SEvent::Reset() {
}
int32_t SEvent::Set() {
#if defined(PLATFORM_WIN)
#if defined(WHOA_PLATFORM_WIN)
return SetEvent(this->m_opaqueData);
#endif
#if defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
#if defined(WHOA_PLATFORM_MAC) || defined(WHOA_PLATFORM_LINUX)
pthread_mutex_lock(&this->m_mutex);
this->m_value = 1;