55
66--*/
77
8+ //
9+ // The different kinds of references on a Configuration.
10+ //
811typedef enum QUIC_CONFIGURATION_REF {
912
10- QUIC_CONF_REF_HANDLE , // The handle provided to the app.
11- QUIC_CONF_REF_CONNECTION , // Per connection using this Configuration.
12- QUIC_CONF_REF_LOAD_CRED , // During async credential loading.
13- QUIC_CONF_REF_OPERATION , // Per queued operation.
13+ QUIC_CONF_REF_HANDLE ,
14+ QUIC_CONF_REF_CONNECTION ,
15+ QUIC_CONF_REF_LOAD_CRED ,
16+ QUIC_CONF_REF_CONN_START_OP ,
17+ QUIC_CONF_REF_CONN_SET_OP ,
1418
1519 QUIC_CONF_REF_COUNT
1620} QUIC_CONFIGURATION_REF ;
@@ -45,7 +49,7 @@ typedef struct QUIC_CONFIGURATION {
4549 //
4650 // Detailed Reference count.
4751 //
48- uint16_t RefTypeCount [QUIC_CONF_REF_COUNT ];
52+ CXPLAT_REF_COUNT RefTypeCount [QUIC_CONF_REF_COUNT ];
4953#endif
5054
5155 //
@@ -127,12 +131,12 @@ QuicConfigurationAddRef(
127131 _In_ QUIC_CONFIGURATION_REF Ref
128132 )
129133{
134+ CxPlatRefIncrement (& Configuration -> RefCount );
130135#if DEBUG
131- InterlockedIncrement16 (( volatile short * ) & Configuration -> RefTypeCount [Ref ]);
136+ CxPlatRefIncrement ( & Configuration -> RefTypeCount [Ref ]);
132137#else
133138 UNREFERENCED_PARAMETER (Ref );
134139#endif
135- CxPlatRefIncrement (& Configuration -> RefCount );
136140}
137141
138142//
@@ -146,9 +150,7 @@ QuicConfigurationRelease(
146150 )
147151{
148152#if DEBUG
149- CXPLAT_TEL_ASSERT (Configuration -> RefTypeCount [Ref ] > 0 );
150- uint16_t Result = (uint16_t )InterlockedDecrement16 ((volatile short * )& Configuration -> RefTypeCount [Ref ]);
151- CXPLAT_TEL_ASSERT (Result != 0xFFFF );
153+ CxPlatRefDecrement (& Configuration -> RefTypeCount [Ref ]);
152154#else
153155 UNREFERENCED_PARAMETER (Ref );
154156#endif
0 commit comments