| 112 | } |
| 113 | |
| 114 | void leave() |
| 115 | { |
| 116 | #if defined DEV_BUILD |
| 117 | // NS: This check is based on internal structure on CRITICAL_SECTION |
| 118 | // On 9X it works differently, and future OS versions may break this check as well |
| 119 | if ((U_IPTR) spinlock.OwningThread != GetCurrentThreadId()) |
| 120 | DebugBreak(); |
| 121 | |
| 122 | lockCount--; |
| 123 | #endif |
| 124 | LeaveCriticalSection(&spinlock); |
| 125 | } |
| 126 | |
| 127 | #ifdef DEV_BUILD |
| 128 | bool locked() |
no test coverage detected