uhd: inline thread priority setting
Push the ability to set thread priority out to the 52M
Transceiver interface, because that's where the thread
control exists.
Signed-off-by: Thomas Tsou <ttsou@vt.edu>
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2644 19bc5d8c-e614-43d4-8b26-e1612bc8e597
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 7cb2128..4d7b36a 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -763,6 +763,8 @@
void *FIFOServiceLoopAdapter(Transceiver *transceiver)
{
+ transceiver->setPriority();
+
while (1) {
transceiver->driveReceiveFIFO();
transceiver->driveTransmitFIFO();
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index e724c03..4a84e27 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -169,7 +169,6 @@
/** attach the radioInterface transmit FIFO */
void transmitFIFO(VectorFIFO *wFIFO) { mTransmitFIFO = wFIFO;}
-
protected:
/** drive reception and demodulation of GSM bursts */
@@ -194,6 +193,10 @@
friend void *TransmitPriorityQueueServiceLoopAdapter(Transceiver *);
void reset();
+
+ /** set priority on current thread */
+ void setPriority() { mRadioInterface->setPriority(); }
+
};
/** FIFO thread loop */
diff --git a/Transceiver52M/radioInterface.h b/Transceiver52M/radioInterface.h
index 1dfb37c..090b296 100644
--- a/Transceiver52M/radioInterface.h
+++ b/Transceiver52M/radioInterface.h
@@ -226,6 +226,8 @@
/** returns the full-scale receive amplitude **/
double fullScaleOutputValue();
+ /** set thread priority on current thread */
+ void setPriority() { mRadio->setPriority(); }
protected: