mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 00:49:08 +00:00
chore(build): add WOW and SC1 flavors
This commit is contained in:
parent
222e3ec624
commit
62121bef6f
4 changed files with 54 additions and 18 deletions
|
|
@ -6,11 +6,18 @@ CCritSect::CCritSect() {
|
|||
#endif
|
||||
|
||||
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX)
|
||||
#if defined(WHOA_STORM_C_CRIT_SECT_RECURSIVE)
|
||||
// Use of SRgnDuplicate on systems with pthreads needs recursive locking (inside s_rgntable) to prevent deadlocks.
|
||||
// This behavior doesn't appear to have carried forward to World of Warcraft, probably because SCritSect was
|
||||
// preferred.
|
||||
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);
|
||||
#else
|
||||
pthread_mutex_init(&this->m_critsect, nullptr);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue