File tree 4 files changed +6
-4
lines changed
4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -860,7 +860,7 @@ class CUDT
860
860
int32_t m_iRcvLastSkipAck; // Last dropped sequence ACK
861
861
int32_t m_iRcvLastAckAck; // Last sent ACK that has been acknowledged
862
862
int32_t m_iAckSeqNo; // Last ACK sequence number
863
- int32_t m_iRcvCurrSeqNo; // Largest received sequence number
863
+ srt::sync::atomic< int32_t > m_iRcvCurrSeqNo; // Largest received sequence number
864
864
int32_t m_iRcvCurrPhySeqNo; // Same as m_iRcvCurrSeqNo, but physical only (disregarding a filter)
865
865
866
866
int32_t m_iPeerISN; // Initial Sequence Number of the peer side
Original file line number Diff line number Diff line change @@ -449,7 +449,7 @@ class CUDTGroup
449
449
bool m_bSyncOnMsgNo;
450
450
SRT_GROUP_TYPE m_type;
451
451
CUDTSocket* m_listener; // A "group" can only have one listener.
452
- int m_iBusy;
452
+ srt::sync::atomic< int > m_iBusy;
453
453
CallbackHolder<srt_connect_callback_fn> m_cbConnectHook;
454
454
void installConnectHook (srt_connect_callback_fn* hook, void * opaq)
455
455
{
Original file line number Diff line number Diff line change @@ -242,15 +242,17 @@ void CUnitQueue::makeUnitFree(CUnit *unit)
242
242
SRT_ASSERT (unit != NULL );
243
243
SRT_ASSERT (unit->m_iFlag != CUnit::FREE);
244
244
unit->m_iFlag = CUnit::FREE;
245
+
245
246
--m_iCount;
246
247
}
247
248
248
249
void CUnitQueue::makeUnitGood (CUnit *unit)
249
250
{
251
+ ++m_iCount;
252
+
250
253
SRT_ASSERT (unit != NULL );
251
254
SRT_ASSERT (unit->m_iFlag == CUnit::FREE);
252
255
unit->m_iFlag = CUnit::GOOD;
253
- ++m_iCount;
254
256
}
255
257
256
258
CSndUList::CSndUList ()
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ class CUnitQueue
136
136
CUnit* m_pAvailUnit; // recent available unit
137
137
138
138
int m_iSize; // total size of the unit queue, in number of packets
139
- int m_iCount; // total number of valid (occupied) packets in the queue
139
+ srt::sync::atomic< int > m_iCount; // total number of valid (occupied) packets in the queue
140
140
141
141
int m_iMSS; // unit buffer size
142
142
int m_iIPversion; // IP version
You can’t perform that action at this time.
0 commit comments