mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 18:42:28 +00:00
fix(thread): correct layout of SSyncObject
This commit is contained in:
parent
0d00bd3ae4
commit
83cd9b05c0
6 changed files with 25 additions and 24 deletions
|
|
@ -32,7 +32,7 @@ uint32_t S_Thread::s_SLaunchThread(void* threadParam) {
|
|||
|
||||
if (params->syncObject) {
|
||||
pthread_mutex_lock(¶ms->syncObject->m_mutex);
|
||||
params->syncObject->m_value = 1;
|
||||
params->syncObject->m_value1 = 1;
|
||||
pthread_mutex_unlock(¶ms->syncObject->m_mutex);
|
||||
pthread_cond_signal(¶ms->syncObject->m_cond);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ int32_t SCreateThread(uint32_t (*threadProc)(void*), void* threadParam, void* a3
|
|||
params->syncObject = syncObject;
|
||||
|
||||
if (syncObject) {
|
||||
syncObject->m_value = 0;
|
||||
syncObject->m_value1 = 0;
|
||||
pthread_cond_init(&syncObject->m_cond, nullptr);
|
||||
pthread_mutex_init(&syncObject->m_mutex, nullptr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue