mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
chore(build): make platform and arch defines more specific
This commit is contained in:
parent
5e2001a164
commit
be391c6592
12 changed files with 41 additions and 41 deletions
|
|
@ -1,23 +1,23 @@
|
|||
#include "storm/thread/SSyncObject.hpp"
|
||||
|
||||
#if defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
|
||||
#if defined(WHOA_PLATFORM_MAC) || defined(WHOA_PLATFORM_LINUX)
|
||||
#include <cerrno>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
SSyncObject::SSyncObject() {
|
||||
#if defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
|
||||
#if defined(WHOA_PLATFORM_MAC) || defined(WHOA_PLATFORM_LINUX)
|
||||
pthread_mutex_init(&this->m_mutex, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t SSyncObject::Wait(uint32_t timeoutMs) {
|
||||
#if defined(PLATFORM_WIN)
|
||||
#if defined(WHOA_PLATFORM_WIN)
|
||||
return WaitForSingleObject(this->m_opaqueData, timeoutMs);
|
||||
#endif
|
||||
|
||||
#if defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
|
||||
#if defined(WHOA_PLATFORM_MAC) || defined(WHOA_PLATFORM_LINUX)
|
||||
if (this->m_int0 == 6) {
|
||||
// WAIT_FAILED
|
||||
return 0xFFFFFFFF;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue