Commit aa8810bf authored by mir's avatar mir

Cancellation added

parent 356da54c
......@@ -155,6 +155,12 @@ NR_gNB_ULSCH_t new_gNB_ulsch(uint8_t max_ldpc_iterations, uint16_t N_RB_UL)
void nr_processULSegment(void *arg)
{
ldpcDecode_t *rdata = (ldpcDecode_t *)arg;
#ifdef TASK_MANAGER
if(*rdata->cancel == true);
return;
#endif
PHY_VARS_gNB *phy_vars_gNB = rdata->gNB;
NR_UL_gNB_HARQ_t *ulsch_harq = rdata->ulsch_harq;
t_nrLDPC_dec_params *p_decoderParms = &rdata->decoderParms;
......@@ -610,6 +616,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
#ifdef TASK_MANAGER
ldpcDecode_t* arr = calloc(harq_process->C, sizeof(ldpcDecode_t));
_Atomic bool cancel = false;
int idx_arr = 0;
#endif
......@@ -617,6 +624,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
int E = nr_get_E(G, harq_process->C, Qm, n_layers, r);
#ifdef TASK_MANAGER
ldpcDecode_t* rdata = &arr[idx_arr];
rdata->cancel = &cancel;
++idx_arr;
#else
union ldpcReqUnion id = {.s = {ulsch->rnti, frame, nr_tti_rx, 0, 0}};
......
......@@ -810,6 +810,9 @@ typedef struct LDPCDecode_s {
int offset;
int decodeIterations;
uint32_t tbslbrm;
#ifdef TASK_MANAGER
_Atomic bool* cancel;
#endif
} ldpcDecode_t;
struct ldpcReqId {
......
......@@ -262,11 +262,11 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req)
rdata->Kr_bytes - (ulsch_harq->F>>3) -((ulsch_harq->C>1)?3:0));
} else {
if ( rdata->nbSegments != ulsch_harq->processedSegments ) {
// Let's forget about this optimization for now
if (rdata->nbSegments != ulsch_harq->processedSegments){
#ifdef TASK_MANAGER
printf("openair1/SCHED_NR/phy_procedures_nr_gNB.c:267 \n");
assert(0 != 0);
#ifndef TASK_MANAGER
*rdata->cancel = true;
#else
int nb = abortTpoolJob(&gNB->threadPool, req->key);
nb += abortNotifiedFIFOJob(&gNB->respDecode, req->key);
gNB->nbDecode-=nb;
......
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