Change in osmo-trx[master]: lms: Move rx_buffers allocation to constructor
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/16875 ) Change subject: lms: Move rx_buffers allocation to constructor .. lms: Move rx_buffers allocation to constructor Release is done in destructor, so let's move allocation to constructor since there's really no need to have them in open() which is already quite complex and large. Change-Id: I8a4fd973590c4c165abd8f2837b2da8fc14a2066 --- M Transceiver52M/device/lms/LMSDevice.cpp 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index 3d2b68e..8ad338b 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -58,6 +58,11 @@ tx_gains.resize(chans); rx_buffers.resize(chans); + + /* Set up per-channel Rx timestamp based Ring buffers */ + for (size_t i = 0; i < rx_buffers.size(); i++) + rx_buffers[i] = new smpl_buf(SAMPLE_BUF_SZ / sizeof(uint32_t)); + } LMSDevice::~LMSDevice() @@ -243,10 +248,6 @@ goto out_close; } - /* Set up per-channel Rx timestamp based Ring buffers */ - for (size_t i = 0; i < rx_buffers.size(); i++) - rx_buffers[i] = new smpl_buf(SAMPLE_BUF_SZ / sizeof(uint32_t)); - return NORMAL; out_close: -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/16875 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I8a4fd973590c4c165abd8f2837b2da8fc14a2066 Gerrit-Change-Number: 16875 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-trx[master]: lms: Move rx_buffers allocation to constructor
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/16875 ) Change subject: lms: Move rx_buffers allocation to constructor .. Patch Set 2: Code-Review+2 +1+1=+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/16875 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I8a4fd973590c4c165abd8f2837b2da8fc14a2066 Gerrit-Change-Number: 16875 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 15 Jan 2020 15:00:21 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-trx[master]: lms: Move rx_buffers allocation to constructor
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/16875 ) Change subject: lms: Move rx_buffers allocation to constructor .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/16875 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I8a4fd973590c4c165abd8f2837b2da8fc14a2066 Gerrit-Change-Number: 16875 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 15 Jan 2020 14:52:56 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-trx[master]: lms: Move rx_buffers allocation to constructor
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/16875 ) Change subject: lms: Move rx_buffers allocation to constructor .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/16875 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I8a4fd973590c4c165abd8f2837b2da8fc14a2066 Gerrit-Change-Number: 16875 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Wed, 15 Jan 2020 02:16:47 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-trx[master]: lms: Move rx_buffers allocation to constructor
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/16875 ) Change subject: lms: Move rx_buffers allocation to constructor .. lms: Move rx_buffers allocation to constructor Release is done in destructor, so let's move allocation to constructor since there's really no need to have them in open() which is already quite complex and large. Change-Id: I8a4fd973590c4c165abd8f2837b2da8fc14a2066 --- M Transceiver52M/device/lms/LMSDevice.cpp 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/75/16875/1 diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index cb0129a..a533e7e 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -58,6 +58,11 @@ tx_gains.resize(chans); rx_buffers.resize(chans); + + /* Set up per-channel Rx timestamp based Ring buffers */ + for (size_t i = 0; i < rx_buffers.size(); i++) + rx_buffers[i] = new smpl_buf(SAMPLE_BUF_SZ / sizeof(uint32_t)); + } LMSDevice::~LMSDevice() @@ -243,10 +248,6 @@ goto out_close; } - /* Set up per-channel Rx timestamp based Ring buffers */ - for (size_t i = 0; i < rx_buffers.size(); i++) - rx_buffers[i] = new smpl_buf(SAMPLE_BUF_SZ / sizeof(uint32_t)); - return NORMAL; out_close: -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/16875 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I8a4fd973590c4c165abd8f2837b2da8fc14a2066 Gerrit-Change-Number: 16875 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange