MCPcopy Create free account
hub / github.com/cuberite/cuberite / Lock

Method Lock

src/OSSupport/CriticalSection.cpp:52–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50
51
52void cCriticalSection::Lock()
53{
54 #ifdef _WIN32
55 EnterCriticalSection(&m_CriticalSection);
56 #else
57 pthread_mutex_lock(&m_CriticalSection);
58 #endif
59
60 #ifdef _DEBUG
61 m_IsLocked += 1;
62 m_OwningThreadID = cIsThread::GetCurrentID();
63 #endif // _DEBUG
64}
65
66
67

Calls

no outgoing calls

Tested by

no test coverage detected