more pthread protection in nr-gnb.c

This commit is contained in:
Raymond Knopp
2019-05-21 19:25:02 +02:00
parent aaa3afb722
commit 4cd3d635f7
3 changed files with 15 additions and 7 deletions
+6 -3
View File
@@ -98,6 +98,7 @@ typedef struct {
int64_t rx_count;
int wait_for_first_pps;
int use_gps;
int first_tx;
//! timestamp of RX packet
openair0_timestamp rx_timestamp;
@@ -323,10 +324,10 @@ static int trx_usrp_start(openair0_device *device) {
cmd.stream_now = false; // start at constant delay
s->rx_stream->issue_stream_cmd(cmd);
s->tx_md.time_spec = cmd.time_spec + uhd::time_spec_t(1-(double)s->tx_forward_nsamps/s->sample_rate);
/*s->tx_md.time_spec = cmd.time_spec + uhd::time_spec_t(1-(double)s->tx_forward_nsamps/s->sample_rate);
s->tx_md.has_time_spec = true;
s->tx_md.start_of_burst = true;
s->tx_md.end_of_burst = false;
s->tx_md.end_of_burst = false;*/
s->rx_count = 0;
s->tx_count = 0;
s->rx_timestamp = 0;
@@ -496,10 +497,12 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
last_packet_state=true;
}
s->tx_md.has_time_spec = true;
s->tx_md.start_of_burst = first_packet_state;
s->tx_md.start_of_burst = (s->tx_count==0) ? true : first_packet_state;
s->tx_md.end_of_burst = last_packet_state;
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate);
s->tx_count++;
if (cc>1) {
std::vector<void *> buff_ptrs;