MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / lock

Method lock

util/Mutex.cpp:176–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174
175
176void CriticalSection::lock(bool errorCheck)
177{
178 #ifdef _WIN32
179
180 if(WaitForSingleObject(mutex, INFINITE) == WAIT_FAILED && errorCheck)
181 throw(W32Error("CriticalSection::lock()"));
182
183 #else
184
185 int ret;
186 if((ret = pthread_mutex_lock(&mutex)) != 0 && errorCheck)
187 throw(Error("CriticalSection::lock()", strerror(ret)));
188
189 #endif
190}
191
192
193void CriticalSection::unlock(bool errorCheck)

Callers 7

~VGLTransReceiverMethod · 0.45
runMethod · 0.45
~ListenerMethod · 0.45
getFrameMethod · 0.45
SafeLockMethod · 0.45
~GenericQMethod · 0.45
~SocketMethod · 0.45

Calls 2

W32ErrorClass · 0.85
ErrorClass · 0.50

Tested by

no test coverage detected