Handle NULL return of pullTpool()
This commit is contained in:
@@ -740,6 +740,8 @@ void pusch_procedures_fromsplit(uint8_t *bufferZone, int bufSize, PHY_VARS_eNB *
|
||||
|
||||
while (proc->nbDecode > 0) {
|
||||
notifiedFIFO_elt_t *req=pullTpool(proc->respDecode, proc->threadPool);
|
||||
if (req == NULL)
|
||||
break; // Tpool has been stopped
|
||||
postDecode(proc, req);
|
||||
delNotifiedFIFO_elt(req);
|
||||
}
|
||||
|
||||
@@ -248,6 +248,8 @@ void rx_func(void *param) {
|
||||
// Its a FIFO so it maitains the order in which the MAC fills the messages
|
||||
// so no need for checking for right slot
|
||||
res = pullTpool(&gNB->L1_tx_filled, &gNB->threadPool);
|
||||
if (res == NULL)
|
||||
return; // Tpool has been stopped
|
||||
syncMsg = (processingData_L1tx_t *)NotifiedFifoData(res);
|
||||
syncMsg->gNB = gNB;
|
||||
syncMsg->timestamp_tx = info->timestamp_tx;
|
||||
@@ -255,6 +257,8 @@ void rx_func(void *param) {
|
||||
pushTpool(&gNB->threadPool, res);
|
||||
} else if (get_softmodem_params()->continuous_tx) {
|
||||
notifiedFIFO_elt_t *res = pullTpool(&gNB->L1_tx_free, &gNB->threadPool);
|
||||
if (res == NULL)
|
||||
return; // Tpool has been stopped
|
||||
processingData_L1tx_t *syncMsg = (processingData_L1tx_t *)NotifiedFifoData(res);
|
||||
syncMsg->gNB = gNB;
|
||||
syncMsg->timestamp_tx = info->timestamp_tx;
|
||||
@@ -377,6 +381,7 @@ void *tx_reorder_thread(void* param) {
|
||||
|
||||
|
||||
resL1Reserve = pullTpool(&gNB->L1_tx_out, &gNB->threadPool);
|
||||
AssertFatal(resL1Reserve != NULL, "pullTpool() did not return start message in %s\n", __func__);
|
||||
int next_tx_slot=((processingData_L1tx_t *)NotifiedFifoData(resL1Reserve))->slot;
|
||||
|
||||
while (!oai_exit) {
|
||||
@@ -390,7 +395,7 @@ void *tx_reorder_thread(void* param) {
|
||||
}
|
||||
} else {
|
||||
resL1 = pullTpool(&gNB->L1_tx_out, &gNB->threadPool);
|
||||
if (((processingData_L1tx_t *)NotifiedFifoData(resL1))->slot != next_tx_slot) {
|
||||
if (resL1 != NULL && ((processingData_L1tx_t *)NotifiedFifoData(resL1))->slot != next_tx_slot) {
|
||||
if (resL1Reserve)
|
||||
LOG_E(PHY,"error, have a stored packet, then a second one\n");
|
||||
resL1Reserve = resL1;
|
||||
@@ -399,6 +404,8 @@ void *tx_reorder_thread(void* param) {
|
||||
LOG_E(PHY,"error, pull two msg, none is good\n");
|
||||
}
|
||||
}
|
||||
if (resL1 == NULL)
|
||||
break; // Tpool has been stopped
|
||||
processingData_L1tx_t *syncMsgL1= (processingData_L1tx_t *)NotifiedFifoData(resL1);
|
||||
processingData_RU_t syncMsgRU;
|
||||
syncMsgRU.frame_tx = syncMsgL1->frame;
|
||||
|
||||
@@ -1252,6 +1252,8 @@ void *ru_thread( void *param ) {
|
||||
|
||||
// At this point, all information for subframe has been received on FH interface
|
||||
res = pullTpool(&gNB->resp_L1, &gNB->threadPool);
|
||||
if (res == NULL)
|
||||
break; // Tpool has been stopped
|
||||
syncMsg = (processingData_L1_t *)NotifiedFifoData(res);
|
||||
syncMsg->gNB = gNB;
|
||||
syncMsg->frame_rx = proc->frame_rx;
|
||||
|
||||
@@ -692,6 +692,8 @@ void processSlotRX(void *arg) {
|
||||
// Wait for PUSCH processing to finish
|
||||
notifiedFIFO_elt_t *res;
|
||||
res = pullTpool(&rxtxD->txFifo,&(get_nrUE_params()->Tpool));
|
||||
if (res == NULL)
|
||||
return; // Tpool has been stopped
|
||||
delNotifiedFIFO_elt(res);
|
||||
|
||||
// calling UL_indication to schedule things other than PUSCH (eg, PUCCH)
|
||||
@@ -1008,6 +1010,8 @@ void *UE_thread(void *arg) {
|
||||
|
||||
while (nbSlotProcessing >= NR_RX_NB_TH) {
|
||||
res=pullTpool(&nf, &(get_nrUE_params()->Tpool));
|
||||
if (res == NULL)
|
||||
break; // Tpool has been stopped
|
||||
nbSlotProcessing--;
|
||||
nr_rxtx_thread_data_t *tmp=(nr_rxtx_thread_data_t *)res->msgData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user