diff options
author | Eric <ewild@sysmocom.de> | 2023-05-23 10:59:58 +0200 |
---|---|---|
committer | Eric <ewild@sysmocom.de> | 2023-07-07 19:12:39 +0200 |
commit | 40978041ada76ccbf620310972c37cf115c85e14 (patch) | |
tree | f86d211535b99f5b3aefc29bcd480ea811f2448f | |
parent | 3e7f4b0da91b1e522fc52daea77c9a1ea3e8fe6f (diff) |
ms : rename var
Change-Id: I44e5d1770b248f107abce5683d5f7641655da764
-rw-r--r-- | Transceiver52M/ms/bladerf_specific.h | 10 | ||||
-rw-r--r-- | Transceiver52M/ms/ms.cpp | 6 | ||||
-rw-r--r-- | Transceiver52M/ms/uhd_specific.h | 4 |
3 files changed, 10 insertions, 10 deletions
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 @@ struct blade_hw { 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 @@ struct blade_hw { 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 @@ struct blade_hw { 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 @@ struct blade_hw { { 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 @@ struct blade_hw { { 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 @@ static int offset_ctr = 0; #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 @@ bh_fn_t ms_trx::tx_bh() 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::set_upper_ready(bool is_ready) 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 @@ struct uhd_hw { 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 @@ struct uhd_hw { 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); } }; |