MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / lock

Method lock

source/util/synchronization.cpp:38–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void BoxedWineCondition::lock() {
39 this->m.lock();
40 if (KThread::currentThread()) {
41 this->lockOwner = KThread::currentThread()->id;
42 } else {
43 this->lockOwner = 0xFFFFFFFF;
44 }
45}
46
47bool BoxedWineCondition::tryLock() {
48 if (this->m.try_lock()) {

Calls

no outgoing calls

Tested by

no test coverage detected