4#define TEARDOWN_ACTIVE (1ULL << 63)
5#define REFERENCE_COUNT (0x7FFFFFFFFFFFFFFF)
28 uint64_t expected, desired;
30 expected = __atomic_load_n(&rundown->Count, __ATOMIC_SEQ_CST);
35 desired = expected + 1;
84 uint64_t expected = __atomic_load_n(&rundown->Count, __ATOMIC_SEQ_CST);
102 while ((__atomic_load_n(&rundown->Count, __ATOMIC_SEQ_CST) &
REFERENCE_COUNT) != 0) {
FORCEINLINE uint64_t InterlockedDecrementU64(volatile uint64_t *target)
FORCEINLINE bool InterlockedCompareExchangeU64_bool(volatile uint64_t *target, uint64_t value, uint64_t *expected)
FORCEINLINE void __pause(void)
struct _RUNDOWN_REF * PRUNDOWN_REF
bool MsAcquireRundownProtection(IN PRUNDOWN_REF rundown)
void MsReleaseRundownProtection(IN PRUNDOWN_REF rundown)
void MsWaitForRundownProtectionRelease(IN PRUNDOWN_REF rundown)