| 99 | } |
| 100 | |
| 101 | bool tryEnter(const char* aReason) |
| 102 | { |
| 103 | const bool ret = (TryEnterCriticalSection(&spinlock) == TRUE); |
| 104 | if (ret) |
| 105 | { |
| 106 | reason(aReason); |
| 107 | #ifdef DEV_BUILD |
| 108 | lockCount++; |
| 109 | #endif |
| 110 | } |
| 111 | return ret; |
| 112 | } |
| 113 | |
| 114 | void leave() |
| 115 | { |
no test coverage detected