squall/storm/thread/SThread.cpp

18 lines
487 B
C++
Raw Normal View History

2020-11-01 17:45:45 -06:00
#include "storm/thread/SThread.hpp"
#include "storm/Thread.hpp"
2020-09-09 00:45:46 -05:00
int32_t SThread::Create(uint32_t (*threadProc)(void*), void* param, SThread& thread, char* threadName, uint32_t a5) {
#if defined(PLATFORM_WIN)
// TODO implement
#endif
#if defined(PLATFORM_MAC) || defined(PLATFORM_LINUX)
thread.m_int0 = 5;
thread.m_value = 0;
pthread_cond_init(&thread.m_cond, nullptr);
uint32_t v8;
return SCreateThread(threadProc, param, &v8, &thread, nullptr) != 0;
#endif
}