Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/32947 )

Change subject: ms : rename var
......................................................................

ms : rename var

Change-Id: I44e5d1770b248f107abce5683d5f7641655da764
---
M Transceiver52M/ms/bladerf_specific.h
M Transceiver52M/ms/ms.cpp
M Transceiver52M/ms/uhd_specific.h
3 files changed, 19 insertions(+), 10 deletions(-)

Approvals:
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  laforge: Looks good to me, approved




diff --git a/Transceiver52M/ms/bladerf_specific.h 
b/Transceiver52M/ms/bladerf_specific.h
index 85a2ea0..ba5c7f1 100644
--- a/Transceiver52M/ms/bladerf_specific.h
+++ b/Transceiver52M/ms/bladerf_specific.h
@@ -197,7 +197,7 @@
        const int rxtxdelay;

        float rxgain, txgain;
-       static std::atomic<bool> stop_me_flag;
+       static std::atomic<bool> stop_lower_threads_flag;

        struct ms_trx_config {
                int tx_freq;
@@ -384,7 +384,7 @@
                        static int to_skip = 0;
                        dev_buf_t *rcd = (dev_buf_t *)samples;

-                       if (stop_me_flag)
+                       if (stop_lower_threads_flag)
                                return BLADERF_STREAM_SHUTDOWN;

                        if (to_skip < 120) // prevents weird overflows on 
startup
@@ -409,7 +409,7 @@
                        if (samples) // put buffer address back into queue, 
ready to be reused
                                trx->buf_mgmt.bufptrqueue.spsc_push(&ptr);

-                       if (stop_me_flag)
+                       if (stop_lower_threads_flag)
                                return BLADERF_STREAM_SHUTDOWN;

                        return BLADERF_STREAM_NO_DATA;
@@ -420,7 +420,7 @@
        {
                auto fn = [this] {
                        int status = 0;
-                       if (!stop_me_flag)
+                       if (!stop_lower_threads_flag)
                                status = bladerf_stream(rx_stream, 
BLADERF_RX_X1);
                        if (status < 0)
                                std::cerr << "rx stream error! " << 
bladerf_strerror(status) << std::endl;
@@ -433,7 +433,7 @@
        {
                auto fn = [this] {
                        int status = 0;
-                       if (!stop_me_flag)
+                       if (!stop_lower_threads_flag)
                                status = bladerf_stream(tx_stream, 
BLADERF_TX_X1);
                        if (status < 0)
                                std::cerr << "rx stream error! " << 
bladerf_strerror(status) << std::endl;
diff --git a/Transceiver52M/ms/ms.cpp b/Transceiver52M/ms/ms.cpp
index f338225..ff0ce59 100644
--- a/Transceiver52M/ms/ms.cpp
+++ b/Transceiver52M/ms/ms.cpp
@@ -50,7 +50,7 @@
 #endif

 template <>
-std::atomic<bool> ms_trx::base::stop_me_flag(false);
+std::atomic<bool> ms_trx::base::stop_lower_threads_flag(false);

 void tx_test(ms_trx *t, ts_hitter_q_t *q, unsigned int *tsc)
 {
@@ -276,7 +276,7 @@

 void ms_trx::start()
 {
-       if (stop_me_flag)
+       if (stop_lower_threads_flag)
                return;
        auto fn = get_rx_burst_handler_fn(rx_bh());
        rx_task = std::thread(fn);
@@ -298,7 +298,7 @@
 void ms_trx::stop_threads()
 {
        std::cerr << "killing threads..." << std::endl;
-       stop_me_flag = true;
+       stop_lower_threads_flag = true;
        close_device();
        std::cerr << "dev closed..." << std::endl;
        rx_task.join();
diff --git a/Transceiver52M/ms/uhd_specific.h b/Transceiver52M/ms/uhd_specific.h
index 07fc449..c8361e9 100644
--- a/Transceiver52M/ms/uhd_specific.h
+++ b/Transceiver52M/ms/uhd_specific.h
@@ -77,7 +77,7 @@
        const unsigned int rxFullScale, txFullScale;
        const int rxtxdelay;
        float rxgain, txgain;
-       static std::atomic<bool> stop_me_flag;
+       static std::atomic<bool> stop_lower_threads_flag;

        virtual ~uhd_hw()
        {
@@ -232,7 +232,7 @@
                        stream_cmd.time_spec = uhd::time_spec_t();
                        rx_stream->issue_stream_cmd(stream_cmd);

-                       while (!stop_me_flag) {
+                       while (!stop_lower_threads_flag) {
                                rx_cb(burst_handler);
                        }
                };

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/32947
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I44e5d1770b248f107abce5683d5f7641655da764
Gerrit-Change-Number: 32947
Gerrit-PatchSet: 4
Gerrit-Owner: Hoernchen <[email protected]>
Gerrit-Reviewer: Hoernchen <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to