mirror of
https://github.com/RangeNetworks/openbts.git
synced 2025-11-02 21:03:16 +00:00
Mutex protect L1Encoder::getNextWriteTime. It is called from another thread in GSMCCCH to set the channel start time.
This commit is contained in:
@@ -110,6 +110,7 @@ class L1Encoder {
|
||||
//@}
|
||||
|
||||
/**@name Multithread access control and data shared across threads. */
|
||||
// (pat) It is not being used effectively.
|
||||
//@{
|
||||
mutable Mutex mEncLock;
|
||||
//@}
|
||||
@@ -127,6 +128,9 @@ class L1Encoder {
|
||||
GSM::Time mPrevWriteTime; ///< timestamp of previous generated burst
|
||||
GSM::Time mNextWriteTime; ///< timestamp of next generated burst
|
||||
|
||||
// (pat 10-2014) Another thread calls getNextWriteTime so we must protect places that write to mNextWriteTime.
|
||||
mutable Mutex mWriteTimeLock;
|
||||
|
||||
volatile bool mRunning; ///< true while the service loop is running
|
||||
Bool_z mEncActive; ///< true between open() and close()
|
||||
Bool_z mEncEverActive; // true if the encoder has ever been active.
|
||||
@@ -210,7 +214,7 @@ class L1Encoder {
|
||||
const L1FEC* parent() const { return mParent; }
|
||||
L1FEC* parent() { return mParent; }
|
||||
|
||||
GSM::Time getNextWriteTime() { resync(); return mNextWriteTime; }
|
||||
GSM::Time getNextWriteTime();
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user