Implement abortTpool()
This stops all ongoing threads (using pthread_join()), and marks FIFOs to not block anymore. In this case, returned messages will be NULL.
This commit is contained in:
@@ -467,6 +467,11 @@ void init_gNB_Tpool(int inst) {
|
||||
}
|
||||
|
||||
|
||||
void term_gNB_Tpool(int inst) {
|
||||
PHY_VARS_gNB *gNB = RC.gNB[inst];
|
||||
abortTpool(&gNB->threadPool);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Terminate gNB TX and RX threads.
|
||||
*/
|
||||
@@ -609,6 +614,7 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
|
||||
void stop_gNB(int nb_inst) {
|
||||
for (int inst=0; inst<nb_inst; inst++) {
|
||||
LOG_I(PHY,"Killing gNB %d processing threads\n",inst);
|
||||
term_gNB_Tpool(inst);
|
||||
kill_gNB_proc(inst);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1271,13 +1271,6 @@ void *ru_thread( void *param ) {
|
||||
else LOG_I(PHY,"RU %d rf device stopped\n",ru->idx);
|
||||
}
|
||||
|
||||
res = pullNotifiedFIFO(&gNB->resp_L1);
|
||||
delNotifiedFIFO_elt(res);
|
||||
res = pullNotifiedFIFO(&gNB->L1_tx_free);
|
||||
delNotifiedFIFO_elt(res);
|
||||
res = pullNotifiedFIFO(&gNB->L1_tx_free);
|
||||
delNotifiedFIFO_elt(res);
|
||||
|
||||
ru_thread_status = 0;
|
||||
return &ru_thread_status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user