Commit 959df471 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/reset-transmission-sequence' into integration_2024_w21

parents d3264774 ca06b77a
...@@ -829,6 +829,7 @@ void *UE_thread(void *arg) ...@@ -829,6 +829,7 @@ void *UE_thread(void *arg)
if (start_rx_stream == 0) { if (start_rx_stream == 0) {
start_rx_stream=1; start_rx_stream=1;
syncInFrame(UE, &sync_timestamp, intialSyncOffset); syncInFrame(UE, &sync_timestamp, intialSyncOffset);
openair0_write_reorder_clear_context(&UE->rfdevice);
shiftForNextFrame = 0; // will be used to track clock drift shiftForNextFrame = 0; // will be used to track clock drift
// read in first symbol // read in first symbol
AssertFatal(UE->frame_parms.ofdm_symbol_size + UE->frame_parms.nb_prefix_samples0 AssertFatal(UE->frame_parms.ofdm_symbol_size + UE->frame_parms.nb_prefix_samples0
......
...@@ -269,3 +269,20 @@ int openair0_write_reorder(openair0_device *device, openair0_timestamp timestamp ...@@ -269,3 +269,20 @@ int openair0_write_reorder(openair0_device *device, openair0_timestamp timestamp
} }
return nsamps; return nsamps;
} }
void openair0_write_reorder_clear_context(openair0_device *device)
{
LOG_I(HW, "received write reorder clear context\n");
re_order_t *ctx = &device->reOrder;
if (!ctx->initDone)
return;
if (pthread_mutex_trylock(&ctx->mutex_write) == 0)
LOG_E(HW, "write_reorder_clear_context call while still writing on the device\n");
pthread_mutex_destroy(&ctx->mutex_write);
pthread_mutex_lock(&ctx->mutex_store);
for (int i = 0; i < WRITE_QUEUE_SZ; i++)
ctx->queue[i].active = false;
pthread_mutex_unlock(&ctx->mutex_store);
pthread_mutex_destroy(&ctx->mutex_store);
ctx->initDone = false;
}
...@@ -671,7 +671,7 @@ extern int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **r ...@@ -671,7 +671,7 @@ extern int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **r
extern void iqrecorder_end(openair0_device *device); extern void iqrecorder_end(openair0_device *device);
int openair0_write_reorder(openair0_device *device, openair0_timestamp timestamp, void **txp, int nsamps, int nbAnt, int flags); int openair0_write_reorder(openair0_device *device, openair0_timestamp timestamp, void **txp, int nsamps, int nbAnt, int flags);
void openair0_write_reorder_clear_context(openair0_device *device);
#include <unistd.h> #include <unistd.h>
#ifndef gettid #ifndef gettid
#define gettid() syscall(__NR_gettid) #define gettid() syscall(__NR_gettid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment