MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / CriticalSectionCreate

Function CriticalSectionCreate

Libraries/unrar/threadmisc.cpp:1–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1static inline bool CriticalSectionCreate(CRITSECT_HANDLE *CritSection)
2{
3#ifdef _WIN_ALL
4 InitializeCriticalSection(CritSection);
5 return true;
6#elif defined(_UNIX)
7 return pthread_mutex_init(CritSection,NULL)==0;
8#endif
9}
10
11
12static inline void CriticalSectionDelete(CRITSECT_HANDLE *CritSection)

Callers 1

ThreadPoolMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected