Fixes issue #545 and unlocking of tti_sync condvar before closing causing deadlock at stop

master
Ismael Gomez 5 years ago
parent aff26abc89
commit d595c4d882

@ -34,7 +34,11 @@ namespace srslte {
tti_sync_cv::~tti_sync_cv()
{
// Wake up any thread waiting on cond before destroying it
pthread_mutex_lock(&mutex);
pthread_cond_signal(&cond);
pthread_cond_destroy(&cond);
pthread_mutex_unlock(&mutex);
pthread_mutex_destroy(&mutex);
}

@ -532,12 +532,12 @@ int mac::rach_detected(uint32_t tti, uint32_t preamble_idx, uint32_t time_adv)
int mac::get_dl_sched(uint32_t tti, dl_sched_t *dl_sched_res)
{
log_h->step(tti);
if (!started) {
return 0;
}
log_h->step(tti);
if (!dl_sched_res) {
return SRSLTE_ERROR_INVALID_INPUTS;
}

Loading…
Cancel
Save