Commit dfd9a91b authored by Robert Schmidt's avatar Robert Schmidt

Rename abortNotifiedFIFO() to abortNotifiedFIFOJob()

parent d73e1a41
...@@ -203,12 +203,12 @@ int main() { ...@@ -203,12 +203,12 @@ int main() {
tmp=pullNotifiedFIFO(&myFifo); tmp=pullNotifiedFIFO(&myFifo);
printf("pulled: %lu\n", tmp->key); printf("pulled: %lu\n", tmp->key);
displayList(&myFifo); displayList(&myFifo);
abortNotifiedFIFO(&myFifo,1005); abortNotifiedFIFOJob(&myFifo,1005);
printf("aborted 1005\n"); printf("aborted 1005\n");
displayList(&myFifo); displayList(&myFifo);
pushNotifiedFIFO(&myFifo,newNotifiedFIFO_elt(sizeof(struct testData), 12345678, NULL, NULL)); pushNotifiedFIFO(&myFifo,newNotifiedFIFO_elt(sizeof(struct testData), 12345678, NULL, NULL));
displayList(&myFifo); displayList(&myFifo);
abortNotifiedFIFO(&myFifo,12345678); abortNotifiedFIFOJob(&myFifo,12345678);
printf("aborted 12345678\n"); printf("aborted 12345678\n");
displayList(&myFifo); displayList(&myFifo);
......
...@@ -200,7 +200,7 @@ static inline time_stats_t exec_time_stats_NotifiedFIFO(const notifiedFIFO_elt_t ...@@ -200,7 +200,7 @@ static inline time_stats_t exec_time_stats_NotifiedFIFO(const notifiedFIFO_elt_t
// This function aborts all messages matching the key // This function aborts all messages matching the key
// If the queue is used in thread pools, it doesn't cancels already running processing // If the queue is used in thread pools, it doesn't cancels already running processing
// because the message has already been picked // because the message has already been picked
static inline int abortNotifiedFIFO(notifiedFIFO_t *nf, uint64_t key) { static inline int abortNotifiedFIFOJob(notifiedFIFO_t *nf, uint64_t key) {
mutexlock(nf->lockF); mutexlock(nf->lockF);
int nbDeleted=0; int nbDeleted=0;
notifiedFIFO_elt_t **start=&nf->outF; notifiedFIFO_elt_t **start=&nf->outF;
......
...@@ -863,7 +863,7 @@ void *UE_thread(void *arg) { ...@@ -863,7 +863,7 @@ void *UE_thread(void *arg) {
while (!oai_exit) { while (!oai_exit) {
if (UE->lost_sync) { if (UE->lost_sync) {
int nb = abortTpoolJob(&(get_nrUE_params()->Tpool),RX_JOB_ID); int nb = abortTpoolJob(&(get_nrUE_params()->Tpool),RX_JOB_ID);
nb += abortNotifiedFIFO(&nf, RX_JOB_ID); nb += abortNotifiedFIFOJob(&nf, RX_JOB_ID);
LOG_I(PHY,"Number of aborted slots %d\n",nb); LOG_I(PHY,"Number of aborted slots %d\n",nb);
for (int i=0; i<nb; i++) for (int i=0; i<nb; i++)
pushNotifiedFIFO_nothreadSafe(&freeBlocks, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), RX_JOB_ID,&nf,processSlotRX)); pushNotifiedFIFO_nothreadSafe(&freeBlocks, newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), RX_JOB_ID,&nf,processSlotRX));
......
...@@ -208,7 +208,7 @@ bool nr_ue_postDecode(PHY_VARS_NR_UE *phy_vars_ue, notifiedFIFO_elt_t *req, bool ...@@ -208,7 +208,7 @@ bool nr_ue_postDecode(PHY_VARS_NR_UE *phy_vars_ue, notifiedFIFO_elt_t *req, bool
} else { } else {
if ( !last ) { if ( !last ) {
int nb=abortTpoolJob(&(pool_dl), req->key); int nb=abortTpoolJob(&(pool_dl), req->key);
nb+=abortNotifiedFIFO(nf_p, req->key); nb+=abortNotifiedFIFOJob(nf_p, req->key);
LOG_D(PHY,"downlink segment error %d/%d, aborted %d segments\n",rdata->segment_r,rdata->nbSegments, nb); LOG_D(PHY,"downlink segment error %d/%d, aborted %d segments\n",rdata->segment_r,rdata->nbSegments, nb);
LOG_D(PHY, "DLSCH %d in error\n",rdata->dlsch_id); LOG_D(PHY, "DLSCH %d in error\n",rdata->dlsch_id);
last = true; last = true;
......
...@@ -1332,7 +1332,7 @@ void postDecode(L1_rxtx_proc_t *proc, notifiedFIFO_elt_t *req) { ...@@ -1332,7 +1332,7 @@ void postDecode(L1_rxtx_proc_t *proc, notifiedFIFO_elt_t *req) {
} else { } else {
if ( rdata->nbSegments != ulsch_harq->processedSegments ) { if ( rdata->nbSegments != ulsch_harq->processedSegments ) {
int nb=abortTpoolJob(proc->threadPool, req->key); int nb=abortTpoolJob(proc->threadPool, req->key);
nb+=abortNotifiedFIFO(proc->respDecode, req->key); nb+=abortNotifiedFIFOJob(proc->respDecode, req->key);
proc->nbDecode-=nb; proc->nbDecode-=nb;
LOG_D(PHY,"uplink segment error %d/%d, aborted %d segments\n",rdata->segment_r,rdata->nbSegments, nb); LOG_D(PHY,"uplink segment error %d/%d, aborted %d segments\n",rdata->segment_r,rdata->nbSegments, nb);
AssertFatal(ulsch_harq->processedSegments+nb == rdata->nbSegments,"processed: %d, aborted: %d, total %d\n", AssertFatal(ulsch_harq->processedSegments+nb == rdata->nbSegments,"processed: %d, aborted: %d, total %d\n",
......
...@@ -207,7 +207,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) { ...@@ -207,7 +207,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
} else { } else {
if ( rdata->nbSegments != ulsch_harq->processedSegments ) { if ( rdata->nbSegments != ulsch_harq->processedSegments ) {
int nb = abortTpoolJob(&gNB->threadPool, req->key); int nb = abortTpoolJob(&gNB->threadPool, req->key);
nb += abortNotifiedFIFO(&gNB->respDecode, req->key); nb += abortNotifiedFIFOJob(&gNB->respDecode, req->key);
gNB->nbDecode-=nb; gNB->nbDecode-=nb;
LOG_D(PHY,"uplink segment error %d/%d, aborted %d segments\n",rdata->segment_r,rdata->nbSegments, nb); LOG_D(PHY,"uplink segment error %d/%d, aborted %d segments\n",rdata->segment_r,rdata->nbSegments, nb);
LOG_D(PHY, "ULSCH %d in error\n",rdata->ulsch_id); LOG_D(PHY, "ULSCH %d in error\n",rdata->ulsch_id);
......
...@@ -88,7 +88,7 @@ int nr_postDecode_sim(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) { ...@@ -88,7 +88,7 @@ int nr_postDecode_sim(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
} else { } else {
if ( rdata->nbSegments != ulsch_harq->processedSegments ) { if ( rdata->nbSegments != ulsch_harq->processedSegments ) {
int nb=abortTpoolJob(&gNB->threadPool, req->key); int nb=abortTpoolJob(&gNB->threadPool, req->key);
nb+=abortNotifiedFIFO(&gNB->respDecode, req->key); nb+=abortNotifiedFIFOJob(&gNB->respDecode, req->key);
gNB->nbDecode-=nb; gNB->nbDecode-=nb;
AssertFatal(ulsch_harq->processedSegments+nb == rdata->nbSegments,"processed: %d, aborted: %d, total %d\n", AssertFatal(ulsch_harq->processedSegments+nb == rdata->nbSegments,"processed: %d, aborted: %d, total %d\n",
ulsch_harq->processedSegments, nb, rdata->nbSegments); ulsch_harq->processedSegments, nb, rdata->nbSegments);
......
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