mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 10:32:29 +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
|
|
@ -7,8 +7,8 @@ SEvent::SEvent(int32_t manualReset, int32_t initialValue)
|
|||
#endif
|
||||
|
||||
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX)
|
||||
this->m_int0 = 2 - (manualReset >= 1);
|
||||
this->m_value = initialValue;
|
||||
this->int0 = 2 - (manualReset >= 1);
|
||||
this->m_value1 = initialValue;
|
||||
|
||||
pthread_cond_init(&this->m_cond, nullptr);
|
||||
#endif
|
||||
|
|
@ -21,7 +21,7 @@ int32_t SEvent::Reset() {
|
|||
|
||||
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX)
|
||||
pthread_mutex_lock(&this->m_mutex);
|
||||
this->m_value = 0;
|
||||
this->m_value1 = 0;
|
||||
pthread_mutex_unlock(&this->m_mutex);
|
||||
|
||||
return 1;
|
||||
|
|
@ -36,7 +36,7 @@ int32_t SEvent::Set() {
|
|||
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX)
|
||||
pthread_mutex_lock(&this->m_mutex);
|
||||
|
||||
this->m_value = 1;
|
||||
this->m_value1 = 1;
|
||||
pthread_cond_signal(&this->m_cond);
|
||||
|
||||
pthread_mutex_unlock(&this->m_mutex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue