mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
There are four possible lock states: 1. Nothing 2. HasLock 3. HasBlockingLock 4. WaitLock The previous switch was implementing the following state transition: s\n| 1 | 2 | 3 | 4 ---+---+---+---+--- 1 | 1 | 2 | 3 | 4 ---+---+---+---+--- 2 | 2 | 2 | 3 | 4 ---+---+---+---+--- 3 | 3 | 3 | 3 | 4 ---+---+---+---+--- 4 | 4 | 4 | 4 | 4 As can be seen, the switch effectively searches for the highest state possible. This change implements it as such.