MCPcopy Create free account
hub / github.com/bloomberg/quantum / tryLockWrite

Method tryLockWrite

quantum/impl/quantum_read_write_mutex_impl.h:72–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72inline
73bool ReadWriteMutex::tryLockWrite()
74{
75 bool rc = _spinlock.tryLockWrite();
76 if (rc) {
77 //mutex is write-locked
78 _taskId = local::taskId();
79 //task id must be valid
80 assert(_taskId != TaskId{});
81 }
82 return rc;
83}
84
85inline
86void ReadWriteMutex::upgradeToWrite()

Callers 2

GuardMethod · 0.45
TESTFunction · 0.45

Calls 1

taskIdFunction · 0.85

Tested by 1

TESTFunction · 0.36