squall/storm/Thread.cpp
2021-12-17 15:43:58 -06:00

19 lines
403 B
C++

#include "storm/Thread.hpp"
#if defined(WHOA_SYSTEM_WIN)
#include <windows.h>
#endif
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX)
#include <pthread.h>
#endif
uintptr_t SGetCurrentThreadId() {
#if defined(WHOA_SYSTEM_WIN)
return GetCurrentThreadId();
#endif
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX)
return reinterpret_cast<uintptr_t>(pthread_self());
#endif
}