Skip to content

Commit 1667dd3

Browse files
committed
Rename Bias to Biased
1 parent c331f02 commit 1667dd3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/core/stream.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ QuicStreamInitialize(
7474
Connection->Settings.StreamMultiReceiveEnabled &&
7575
!Stream->Flags.UseAppOwnedRecvBuffers;
7676
Stream->RecvMaxLength = UINT64_MAX;
77-
Stream->RefCount = 1;
77+
CxPlatRefInitialize(&Stream->RefCount);
7878
Stream->SendRequestsTail = &Stream->SendRequests;
7979
Stream->SendPriority = QUIC_STREAM_PRIORITY_DEFAULT;
8080
CxPlatDispatchLockInitialize(&Stream->ApiSendRequestLock);
@@ -89,8 +89,8 @@ QuicStreamInitialize(
8989
Stream->ReceiveCompleteOperation->API_CALL.Context->Type = QUIC_API_TYPE_STRM_RECV_COMPLETE;
9090
Stream->ReceiveCompleteOperation->API_CALL.Context->STRM_RECV_COMPLETE.Stream = Stream;
9191
#if DEBUG
92-
CxPlatRefInitializeMultiple(Stream->RefTypeBiasCount, QUIC_STREAM_REF_COUNT);
93-
CxPlatRefIncrement(&Stream->RefTypeBiasCount[QUIC_STREAM_REF_APP]);
92+
CxPlatRefInitializeMultiple(Stream->RefTypeBiasedCount, QUIC_STREAM_REF_COUNT);
93+
CxPlatRefIncrement(&Stream->RefTypeBiasedCount[QUIC_STREAM_REF_APP]);
9494
#endif
9595

9696
if (Stream->Flags.Unidirectional) {
@@ -174,7 +174,7 @@ QuicStreamInitialize(
174174

175175
if (Stream) {
176176
#if DEBUG
177-
CxPlatRefDecrement(&Stream->RefTypeBiasCount[QUIC_STREAM_REF_APP]);
177+
CXPLAT_DBG_ASSERT(!CxPlatRefDecrement(&Stream->RefTypeBiasedCount[QUIC_STREAM_REF_APP]));
178178
CxPlatDispatchLockAcquire(&Connection->Streams.AllStreamsLock);
179179
CxPlatListEntryRemove(&Stream->AllStreamsLink);
180180
CxPlatDispatchLockRelease(&Connection->Streams.AllStreamsLock);

src/core/stream.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ typedef struct QUIC_STREAM {
225225
// Note: These ref counts are biased by 1, so lowest they go is 1. It is an
226226
// error for them to ever be zero.
227227
//
228-
CXPLAT_REF_COUNT RefTypeBiasCount[QUIC_STREAM_REF_COUNT];
228+
CXPLAT_REF_COUNT RefTypeBiasedCount[QUIC_STREAM_REF_COUNT];
229229
#endif
230230

231231
//
@@ -712,7 +712,7 @@ QuicStreamAddRef(
712712
CXPLAT_DBG_ASSERT(Stream->RefCount > 0);
713713

714714
#if DEBUG
715-
CxPlatRefIncrement(&Stream->RefTypeBiasCount[Ref]);
715+
CxPlatRefIncrement(&Stream->RefTypeBiasedCount[Ref]);
716716
#else
717717
UNREFERENCED_PARAMETER(Ref);
718718
#endif
@@ -737,15 +737,15 @@ QuicStreamRelease(
737737
CXPLAT_TEL_ASSERT(Stream->RefCount > 0);
738738

739739
#if DEBUG
740-
CXPLAT_TEL_ASSERT(!CxPlatRefDecrement(&Stream->RefTypeBiasCount[Ref]));
740+
CXPLAT_TEL_ASSERT(!CxPlatRefDecrement(&Stream->RefTypeBiasedCount[Ref]));
741741
#else
742742
UNREFERENCED_PARAMETER(Ref);
743743
#endif
744744

745745
if (CxPlatRefDecrement(&Stream->RefCount)) {
746746
#if DEBUG
747747
for (uint32_t i = 0; i < QUIC_STREAM_REF_COUNT; i++) {
748-
CXPLAT_TEL_ASSERT(Stream->RefTypeBiasCount[i] == 1);
748+
CXPLAT_TEL_ASSERT(Stream->RefTypeBiasedCount[i] == 1);
749749
}
750750
#endif
751751
QuicStreamFree(Stream);

0 commit comments

Comments
 (0)