File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ QuicRegistrationRundownAcquire(
183183 //
184184 // Only increment the detailed ref count if the Rundown acquire succeeded.
185185 //
186- CxPlatRefIncrement (& Registration -> RefTypeCount [Ref ]);
186+ InterlockedIncrement64 (& Registration -> RefTypeCount [Ref ]);
187187 }
188188#else
189189 UNREFERENCED_PARAMETER (Ref );
@@ -204,7 +204,8 @@ QuicRegistrationRundownRelease(
204204 )
205205{
206206#if DEBUG
207- CxPlatRefDecrement (& Registration -> RefTypeCount [Ref ]);
207+ InterlockedDecrement64 (& Registration -> RefTypeCount [Ref ]);
208+ CXPLAT_DBG_ASSERT (QuicReadLongPtrNoFence (& Registration -> RefTypeCount [Ref ]) >= 0 );
208209#else
209210 UNREFERENCED_PARAMETER (Ref );
210211#endif
Original file line number Diff line number Diff line change @@ -291,7 +291,9 @@ InterlockedDecrement64(
291291 return __sync_sub_and_fetch (Addend , (int64_t )1 );
292292}
293293
294- #define QuicReadPtrNoFence (p ) ((void*)(*p)) // TODO
294+ #define QuicReadPtrNoFence (p ) __atomic_load_n((p), __ATOMIC_RELAXED)
295+
296+ #define QuicReadLongPtrNoFence (p ) __atomic_load_n((p), __ATOMIC_RELAXED)
295297
296298//
297299// Assertion interfaces.
You can’t perform that action at this time.
0 commit comments