mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
feat(thread): add SCritSect destructor
This commit is contained in:
parent
665f057516
commit
2aa7daab70
2 changed files with 11 additions and 0 deletions
|
|
@ -14,6 +14,16 @@ SCritSect::SCritSect() {
|
|||
#endif
|
||||
}
|
||||
|
||||
SCritSect::~SCritSect() {
|
||||
#if defined(WHOA_SYSTEM_WIN)
|
||||
DeleteCriticalSection(&this->m_opaqueData);
|
||||
#endif
|
||||
|
||||
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX)
|
||||
pthread_mutex_destroy(&this->m_mutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SCritSect::Enter() {
|
||||
#if defined(WHOA_SYSTEM_WIN)
|
||||
EnterCriticalSection(&this->m_opaqueData);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue