squall/storm/thread/SThread.cpp

19 lines
509 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) {
2020-12-02 20:04:02 -06:00
#if defined(WHOA_SYSTEM_WIN)
2020-09-09 00:45:46 -05:00
// TODO implement
return 0;
2020-09-09 00:45:46 -05:00
#endif
2020-12-02 20:04:02 -06:00
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX)
thread.int0 = 5;
thread.m_value1 = 0;
2020-09-09 00:45:46 -05:00
pthread_cond_init(&thread.m_cond, nullptr);
uint32_t v8;
return SCreateThread(threadProc, param, &v8, &thread, nullptr) != 0;
#endif
}