mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-01 18:56:23 -04:00
added mutex protection around pqistreamer::getRates, since float r/w are not necessarily atomic
This commit is contained in:
parent
eba90a83c6
commit
0d1d31a25f
3 changed files with 105 additions and 82 deletions
|
@ -67,6 +67,12 @@ class pqistreamer: public PQInterface
|
|||
virtual void getRates(RsBwRates &rates);
|
||||
virtual int getQueueSize(bool in); // extracting data.
|
||||
virtual int gatherStatistics(std::list<RSTrafficClue>& outqueue_stats,std::list<RSTrafficClue>& inqueue_stats); // extracting data.
|
||||
|
||||
// mutex protected versions of RateInterface calls.
|
||||
virtual void setRate(bool b,float f) ;
|
||||
virtual void setMaxRate(bool b,float f) ;
|
||||
virtual float getRate(bool b) ;
|
||||
|
||||
protected:
|
||||
|
||||
int tick_bio();
|
||||
|
@ -85,7 +91,7 @@ class pqistreamer: public PQInterface
|
|||
virtual int locked_gatherStatistics(std::list<RSTrafficClue>& outqueue_stats,std::list<RSTrafficClue>& inqueue_stats); // extracting data.
|
||||
|
||||
void updateRates() ;
|
||||
|
||||
|
||||
protected:
|
||||
RsMutex mStreamerMtx ; // Protects data, fns below, protected so pqiqos can use it too.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue