| 70 | } |
| 71 | |
| 72 | inline |
| 73 | bool 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 | |
| 85 | inline |
| 86 | void ReadWriteMutex::upgradeToWrite() |