mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 00:49:08 +00:00
fix(thread): pthread attributes didn't mirror windows
This commit is contained in:
parent
6397c2fa17
commit
b8404260b1
1 changed files with 5 additions and 1 deletions
|
|
@ -6,7 +6,11 @@ CCritSect::CCritSect() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX)
|
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX)
|
||||||
pthread_mutex_init(&this->m_critsect, nullptr);
|
pthread_mutexattr_t mutex_attr;
|
||||||
|
pthread_mutexattr_init(&mutex_attr);
|
||||||
|
pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE);
|
||||||
|
|
||||||
|
pthread_mutex_init(&this->m_critsect, &mutex_attr);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue