| 2162 | |
| 2163 | |
| 2164 | static inline void lockSharedSection(volatile FAST_MUTEX_SHARED_SECTION* lpSect, ULONG SpinCount) |
| 2165 | { |
| 2166 | while (InterlockedExchange(FIX_TYPE(&lpSect->lSpinLock), 1) != 0) |
| 2167 | { |
| 2168 | ULONG j = SpinCount; |
| 2169 | while (j != 0) |
| 2170 | { |
| 2171 | if (lpSect->lSpinLock == 0) |
| 2172 | goto next; |
| 2173 | j--; |
| 2174 | } |
| 2175 | switchToThread(); |
| 2176 | next:; |
| 2177 | } |
| 2178 | } |
| 2179 | |
| 2180 | static inline bool tryLockSharedSection(volatile FAST_MUTEX_SHARED_SECTION* lpSect) |
| 2181 | { |
no test coverage detected