X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Frg_sch_lmm.c;h=8f06546656cccad6eb4b20091e5a1439137aa23b;hb=5d74fef7c9fe6b65a965ceac6bfe812872dab323;hp=b94a6f5264e8b281ac07cec84ad99f9085dc17a2;hpb=3235ecfc7414aa0b72d0ad50db63ae8b5626045b;p=o-du%2Fl2.git diff --git a/src/5gnrsch/rg_sch_lmm.c b/src/5gnrsch/rg_sch_lmm.c index b94a6f526..8f0654665 100755 --- a/src/5gnrsch/rg_sch_lmm.c +++ b/src/5gnrsch/rg_sch_lmm.c @@ -39,16 +39,7 @@ static int RLOG_MODULE_ID=4096; static int RLOG_FILE_ID=167; /* header include files (.h) */ -#include "envopt.h" /* environment options */ -#include "envdep.h" /* environment dependent */ -#include "envind.h" /* environment independent */ -#include "gen.h" /* general */ -#include "ssi.h" /* system services */ -#include "cm_tkns.h" /* Common Token Defines */ -#include "cm_llist.h" /* Common Link List Defines */ -#include "cm_hash.h" /* Common Hash List Defines */ -#include "cm_mblk.h" /* common memory link list library */ -#include "cm_lte.h" /* Common LTE Defines */ +#include "common_def.h" #include "rg_env.h" /* MAC Environment Defines */ #include "rgr.h" /* RGR Interface defines */ #include "tfu.h" /* RGU Interface defines */ @@ -64,15 +55,6 @@ static int RLOG_FILE_ID=167; #include "rl_common.h" /* header/extern include files (.x) */ -#include "gen.x" /* general */ -#include "ssi.x" /* system services */ -#include "cm5.x" /* system services */ -#include "cm_tkns.x" /* Common Token Definitions */ -#include "cm_llist.x" /* Common Link List Definitions */ -#include "cm_lib.x" /* Common Library Definitions */ -#include "cm_hash.x" /* Common Hash List Definitions */ -#include "cm_mblk.x" /* common memory link list library */ -#include "cm_lte.x" /* Common LTE Defines */ #include "rgr.x" /* RGR Interface includes */ #include "rgm.x" /* RGM Interface includes */ #include "tfu.x" /* RGU Interface includes */ @@ -83,24 +65,24 @@ static int RLOG_FILE_ID=167; #include "rg_sch_cmn.x" /* typedefs for Scheduler */ #endif #ifndef LTE_L2_MEAS -PUBLIC Void rgSCHCmnInit ARGS((Void)); +Void rgSCHCmnInit ARGS((Void)); #endif /* forward references */ - - +extern int schActvInit(Ent entity, Inst instId, Region region, Reason reason); +#ifdef UNUSE_FUN PRIVATE U16 rgSCHLmmSapCfg ARGS(( Inst inst, RgCfg *cfg, U8 sapIdx, Elmnt sapType )); - +#endif PRIVATE Void rgSCHLmmShutdown ARGS(( Inst inst )); -PUBLIC void printSchCellInfo(void) +void printSchCellInfo(void) { U8 idx=0; U8 inst=0; @@ -117,76 +99,6 @@ PUBLIC void printSchCellInfo(void) } } - -/** - * @brief Task Initiation callback function. - * - * @details - * - * Function : schActvInit - * - * This function is supplied as one of parameters during MAC's - * task registration. SSI will invoke this function once, after - * it creates and attaches this TAPA Task to a system task. - * - * @param[in] Ent Entity, the entity ID of this task. - * @param[in] Inst Inst, the instance ID of this task. - * @param[in] Region Region, the region ID registered for memory - * usage of this task. - * @param[in] Reason Reason. - * @return S16 - * -# ROK - **/ -#ifdef ANSI -PUBLIC S16 schActvInit -( -Ent entity, /* entity */ -Inst instId, /* instance */ -Region region, /* region */ -Reason reason /* reason */ -) -#else -PUBLIC S16 schActvInit(entity, instId, region, reason) -Ent entity; /* entity */ -Inst instId; /* instance */ -Region region; /* region */ -Reason reason; /* reason */ -#endif -{ - Inst inst = (instId - SCH_INST_START); - - TRC2(schActvInit); - - /* Initialize the MAC TskInit structure to zero */ - cmMemset ((U8 *)&rgSchCb[inst], 0, sizeof(RgSchCb)); - - /* Initialize the MAC TskInit with received values */ - rgSchCb[inst].rgSchInit.ent = entity; - rgSchCb[inst].rgSchInit.inst = inst; - rgSchCb[inst].rgSchInit.region = region; - rgSchCb[inst].rgSchInit.pool = 0; - rgSchCb[inst].rgSchInit.reason = reason; - rgSchCb[inst].rgSchInit.cfgDone = FALSE; - rgSchCb[inst].rgSchInit.acnt = FALSE; - rgSchCb[inst].rgSchInit.usta = FALSE; - rgSchCb[inst].rgSchInit.trc = FALSE; -#ifdef DEBUGP -#ifdef RG_DEBUG - /* disabling debugs by default */ - /* rgSchCb[inst].rgSchInit.dbgMask = 0xffffffff; */ -#endif -#endif /* DEBUGP */ - rgSchCb[inst].rgSchInit.procId = SFndProcId(); - - rgSchCb[inst].rgrSap = NULLP; - rgSchCb[inst].tfuSap = NULLP; - rgSchCb[inst].rgmSap = NULLP; - rgSCHCmnInit(); - - RETVALUE(ROK); -} /* schActvInit */ - - /** * @brief SAP Configuration Handler. * @@ -194,7 +106,7 @@ Reason reason; /* reason */ * * Function : rgSCHLmmSapCfg * - * This function in called by HandleSchGenCfgReq(). It handles the + * This function in called by SchProcGenCfgReq(). It handles the * interface SAP configuration of the scheduler instance. It * initializes the sapState to LRG_UNBND. Returns * reason for success/failure of this function. @@ -205,6 +117,7 @@ Reason reason; /* reason */ * -# LCM_REASON_INVALID_SAP * -# LCM_REASON_NOT_APPL **/ +#ifdef UNUSE_FUN #ifdef ANSI PRIVATE U16 rgSCHLmmSapCfg ( @@ -226,16 +139,14 @@ Elmnt sapType; /* SAP Type */ RgSchUpSapCfgInfo *upSapCfg = NULLP; Inst inst = (dInst - SCH_INST_START); - TRC2(rgSCHLmmSapCfg) - /* Check if Gen Config has been done */ switch(sapType) { case STRGRSAP: #ifndef CL_MAC_LWLC - if ((cfg->s.schInstCfg.rgrSap[sapIdx].selector != RGR_SEL_TC) && - (cfg->s.schInstCfg.rgrSap[sapIdx].selector != RGR_SEL_LC)) + if ((cfg->s.schInstCfg.rgrSap[sapIdx].selector != ODU_SELECTOR_TC) && + (cfg->s.schInstCfg.rgrSap[sapIdx].selector != ODU_SELECTOR_LC)) { ret = LCM_REASON_INVALID_PAR_VAL; RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "rgSCHLmmSapCfg(): unsupported" @@ -268,8 +179,8 @@ Elmnt sapType; /* SAP Type */ break; case STTFUSAP: #ifndef CL_MAC_LWLC - if ((cfg->s.schInstCfg.tfuSap[sapIdx].selector != TFU_SEL_TC) && - (cfg->s.schInstCfg.tfuSap[sapIdx].selector != TFU_SEL_LC)) + if ((cfg->s.schInstCfg.tfuSap[sapIdx].selector != ODU_SELECTOR_TC) && + (cfg->s.schInstCfg.tfuSap[sapIdx].selector != ODU_SELECTOR_LC)) { ret = LCM_REASON_INVALID_PAR_VAL; RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "rgSCHLmmSapCfg(): unsupported" @@ -301,8 +212,8 @@ Elmnt sapType; /* SAP Type */ lowSapCfg->sapPst.prior = cfg->s.schInstCfg.tfuSap[sapIdx].prior; lowSapCfg->suId = cfg->s.schInstCfg.tfuSap[sapIdx].suId; lowSapCfg->spId = cfg->s.schInstCfg.tfuSap[sapIdx].spId; - cmMemcpy((U8 *)&lowSapCfg->bndTmr, - (U8 *)&cfg->s.schInstCfg.tfuSap[sapIdx].bndTmr, + memcpy(&lowSapCfg->bndTmr, + &cfg->s.schInstCfg.tfuSap[sapIdx].bndTmr, sizeof(TmrCfg)); break; case STRGMSAP: @@ -344,168 +255,9 @@ Elmnt sapType; /* SAP Type */ /* would never reach here */ break; } - RETVALUE(ret); + return (ret); } - - -/** - * @brief Scheduler instance Configuration Handler. - * - * @details - * - * Function : SchInstCfg - * - * This function in called by HandleSchGenCfgReq(). It handles the - * general and SAP configurations of the scheduler instance. It initializes - * the hash lists of rgSchCb. Returns - * reason for success/failure of this function. - * - * @param[in] RgCfg *cfg, the Configuaration information - * @return U16 - * -# LCM_REASON_NOT_APPL - * -# LCM_REASON_INVALID_MSGTYPE - * -# LCM_REASON_MEM_NOAVAIL - **/ -#ifdef ANSI -PUBLIC U16 SchInstCfg -( -RgCfg *cfg, /* Configuaration information */ -Inst dInst -) -#else -PUBLIC U16 SchInstCfg(cfg,dInst) -RgCfg *cfg; /* Configuaration information */ -Inst dInst; #endif -{ - U16 ret = LCM_REASON_NOT_APPL; - Inst inst = (dInst - SCH_INST_START); - - TRC2(SchInstCfg) - - printf("\nEntered SchInstCfg()"); - /* Check if Instance Configuration is done already */ - if (rgSchCb[inst].rgSchInit.cfgDone == TRUE) - { - RETVALUE(LCM_REASON_INVALID_MSGTYPE); - } - if ((cfg->s.schInstCfg.genCfg.lmPst.selector != LRG_SEL_TC) && - (cfg->s.schInstCfg.genCfg.lmPst.selector != LRG_SEL_LC)) - { - RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg(): unsupported " - "Selector value for lmPst."); - RETVALUE(LCM_REASON_INVALID_PAR_VAL); - } - /* Update the Pst structure for LM interface */ - cmMemcpy((U8 *)&rgSchCb[inst].rgSchInit.lmPst, - (U8 *)&cfg->s.schInstCfg.genCfg.lmPst, - sizeof(Pst)); - - rgSchCb[inst].rgSchInit.inst = inst; - rgSchCb[inst].rgSchInit.lmPst.srcProcId = rgSchCb[inst].rgSchInit.procId; - rgSchCb[inst].rgSchInit.lmPst.srcEnt = rgSchCb[inst].rgSchInit.ent; - rgSchCb[inst].rgSchInit.lmPst.srcInst = rgSchCb[inst].rgSchInit.inst + - SCH_INST_START; - rgSchCb[inst].rgSchInit.lmPst.event = EVTNONE; - - rgSchCb[inst].rgSchInit.region = cfg->s.schInstCfg.genCfg.mem.region; - rgSchCb[inst].rgSchInit.pool = cfg->s.schInstCfg.genCfg.mem.pool; - rgSchCb[inst].genCfg.tmrRes = cfg->s.schInstCfg.genCfg.tmrRes; -#ifdef LTE_ADV - rgSchCb[inst].genCfg.forceCntrlSrbBoOnPCel = cfg->s.schInstCfg.genCfg.forceCntrlSrbBoOnPCel; - rgSchCb[inst].genCfg.isSCellActDeactAlgoEnable = cfg->s.schInstCfg.genCfg.isSCellActDeactAlgoEnable; -#endif - rgSchCb[inst].genCfg.startCellId = cfg->s.schInstCfg.genCfg.startCellId; - -/* Not adding any SAPs towards SCH now */ -#if 0 - /* allocate RGR saps */ - if (SGetSBuf(rgSchCb[inst].rgSchInit.region, - rgSchCb[inst].rgSchInit.pool, - (Data **)&rgSchCb[inst].rgrSap, - (sizeof(RgSchUpSapCb) * cfg->s.schInstCfg.numSaps)) != ROK) - { - RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg: SGetSBuf for " - "RGR saps failed"); - RETVALUE(RFAILED); - } - /* allocate RGM saps */ - if (SGetSBuf(rgSchCb[inst].rgSchInit.region, - rgSchCb[inst].rgSchInit.pool, - (Data **)&rgSchCb[inst].rgmSap, - (sizeof(RgSchUpSapCb) * cfg->s.schInstCfg.numSaps)) != ROK) - { - RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg: SGetSBuf for " - "RGM saps failed"); - RETVALUE(RFAILED); - } - - - /* allocate TFU saps */ - if (SGetSBuf(rgSchCb[inst].rgSchInit.region, - rgSchCb[inst].rgSchInit.pool, - (Data **)&rgSchCb[inst].tfuSap, - (sizeof(RgSchLowSapCb) * cfg->s.schInstCfg.numSaps)) != ROK) - { - RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg: SGetSBuf for TFU " - "saps failed"); - RETVALUE(RFAILED); - } - - /* allocate for bndCfmResponses */ - if (SGetSBuf(rgSchCb[inst].rgSchInit.region, - rgSchCb[inst].rgSchInit.pool, - (Data **)&rgSchCb[inst].genCfg.bndCfmResp, - (sizeof(RgSchLmResponse) * cfg->s.schInstCfg.numSaps)) != ROK) - { - RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg: SGetSBuf for bind" - " confirm responses failed"); - RETVALUE(RFAILED); - } -#ifdef LTE_ADV - rgSCHLaaInitEnbCb(&rgSchCb[inst]); -#endif - rgSchCb[inst].numSaps = cfg->s.schInstCfg.numSaps; - for (idx = 0; idx < cfg->s.schInstCfg.numSaps; idx++) - { - /* Initialize SAP State and configure SAP */ - rgSchCb[inst].rgrSap[idx].sapSta.sapState = LRG_NOT_CFG; - rgSchCb[inst].rgrSap[idx].cell = NULLP; - rgSCHLmmSapCfg(dInst, cfg, idx, STRGRSAP); - - rgSchCb[inst].rgmSap[idx].sapSta.sapState = LRG_NOT_CFG; - rgSchCb[inst].rgmSap[idx].cell = NULLP; - rgSCHLmmSapCfg(dInst, cfg, idx, STRGMSAP); - - rgSchCb[inst].tfuSap[idx].sapSta.sapState = LRG_NOT_CFG; - rgSchCb[inst].tfuSap[idx].cell = NULLP; - rgSCHLmmSapCfg(dInst, cfg, idx, STTFUSAP); - rgSchCb[inst].tfuSap[idx].numBndRetries = 0; - } -#endif - /* Initialzie the timer queue */ - cmMemset((U8 *)&rgSchCb[inst].tmrTq, 0, sizeof(CmTqType)*RGSCH_TQ_SIZE); - /* Initialize the timer control point */ - cmMemset((U8 *)&rgSchCb[inst].tmrTqCp, 0, sizeof(CmTqCp)); - rgSchCb[inst].tmrTqCp.tmrLen = RGSCH_TQ_SIZE; - - /* SS_MT_TMR needs to be enabled as schActvTmr needs instance information */ - /* Timer Registration request to SSI */ - if (SRegTmrMt(rgSchCb[inst].rgSchInit.ent, dInst, - (S16)rgSchCb[inst].genCfg.tmrRes, schActvTmr) != ROK) - { - RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg(): Failed to " - "register timer."); - RETVALUE(LCM_REASON_MEM_NOAVAIL); - } - - /* Set Config done in TskInit */ - rgSchCb[inst].rgSchInit.cfgDone = TRUE; - printf("\nScheduler gen config done"); - - RETVALUE(ret); -} - /*********************************************************** * @@ -545,8 +297,6 @@ Inst inst; RgSchClcBoRpt *bo = NULL; #endif - TRC2(rgSCHLmmShutdown) - #ifdef LTE_L2_MEAS for (idx = 0; idx < instCb->numSaps; idx++) { @@ -685,21 +435,20 @@ Inst inst; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHLmmGenCntrl +Void rgSCHLmmGenCntrl ( RgMngmt *cntrl, RgMngmt *cfm, Pst *cfmPst ) #else -PUBLIC Void rgSCHLmmGenCntrl(cntrl, cfm, cfmPst) +Void rgSCHLmmGenCntrl(cntrl, cfm, cfmPst) RgMngmt *cntrl; RgMngmt *cfm; Pst *cfmPst; #endif { Inst inst = (cfmPst->srcInst - SCH_INST_START); /* Scheduler instance ID */ - TRC2(rgSCHLmmGenCntrl) cfm->cfm.status = LCM_PRIM_OK; cfm->cfm.reason = LCM_REASON_NOT_APPL; @@ -715,8 +464,8 @@ Pst *cfmPst; /* Enable Unsolicited Status (alarms) */ rgSchCb[inst].rgSchInit.usta = TRUE; /*Store the response and TransId for sending the Alarms */ - cmMemcpy((U8 *)&rgSchCb[inst].genCfg.ustaResp.response, - (U8 *)&cntrl->hdr.response, sizeof(Resp)); + memcpy(&rgSchCb[inst].genCfg.ustaResp.response, + &cntrl->hdr.response, sizeof(Resp)); rgSchCb[inst].genCfg.ustaResp.transId = cntrl->hdr.transId; break; case SADBG: @@ -744,8 +493,8 @@ Pst *cfmPst; * L2 * statistics * */ - cmMemset((U8 *)&hqRetxStats, 0, sizeof(RgSchHqRetxStats)); - cmMemset((U8 *)&hqFailStats, 0, sizeof(RgSchNackAckStats)); + memset(&hqRetxStats, 0, sizeof(RgSchHqRetxStats)); + memset(&hqFailStats, 0, sizeof(RgSchNackAckStats)); #endif break; } @@ -814,14 +563,14 @@ Pst *cfmPst; * **********************************************************/ #ifdef ANSI -PUBLIC Void rgSCHLmmSapCntrl +Void rgSCHLmmSapCntrl ( RgMngmt *cntrl, RgMngmt *cfm, Pst *cfmPst ) #else -PUBLIC Void rgSCHLmmSapCntrl(cntrl, cfm, cfmPst) +Void rgSCHLmmSapCntrl(cntrl, cfm, cfmPst) RgMngmt *cntrl; RgMngmt *cfm; Pst *cfmPst; @@ -831,7 +580,6 @@ Pst *cfmPst; /* TODO Pass InstId instead of using InstId from cfmPst */ Inst inst = (cfmPst->srcInst - SCH_INST_START); /* Scheduler instance Id */ - TRC2(rgSCHLmmSapCntrl) /* Only TFU SAP can be controlled by LM */ switch(cntrl->hdr.elmId.elmnt) @@ -866,8 +614,8 @@ Pst *cfmPst; rgSchCb[inst].tfuSap[idx].numBndRetries++; /* Store the response and TransId for sending * the Control confirm */ - cmMemcpy((U8 *)&rgSchCb[inst].genCfg.bndCfmResp[idx].response, - (U8 *)&cntrl->hdr.response, sizeof(Resp)); + memcpy(&rgSchCb[inst].genCfg.bndCfmResp[idx].response, + &cntrl->hdr.response, sizeof(Resp)); rgSchCb[inst].genCfg.bndCfmResp[idx].transId = cntrl->hdr.transId; @@ -921,7 +669,7 @@ Pst *cfmPst; (PTR)&rgSchCb[inst].tfuSap[idx]); } } - cmMemset((U8 *)&rgSchCb[inst].tfuSap[idx], 0, sizeof(RgSchLowSapCb)); + memset(&rgSchCb[inst].tfuSap[idx], 0, sizeof(RgSchLowSapCb)); rgSchCb[inst].tfuSap[idx].sapSta.sapState = LRG_NOT_CFG; cfm->cfm.status = LCM_PRIM_OK; cfm->cfm.reason = LCM_REASON_NOT_APPL; @@ -944,7 +692,7 @@ Pst *cfmPst; switch(cntrl->t.cntrl.action) { case ADEL: - cmMemset((U8 *)&rgSchCb[inst].rgrSap[idx], 0, sizeof(RgSchUpSapCb)); + memset(&rgSchCb[inst].rgrSap[idx], 0, sizeof(RgSchUpSapCb)); rgSchCb[inst].rgrSap[idx].sapSta.sapState = LRG_NOT_CFG; cfm->cfm.status = LCM_PRIM_OK; cfm->cfm.reason = LCM_REASON_NOT_APPL; @@ -967,7 +715,7 @@ Pst *cfmPst; switch(cntrl->t.cntrl.action) { case ADEL: - cmMemset((U8 *)&rgSchCb[inst].rgmSap[idx], 0, sizeof(RgSchUpSapCb)); + memset(&rgSchCb[inst].rgmSap[idx], 0, sizeof(RgSchUpSapCb)); rgSchCb[inst].rgmSap[idx].sapSta.sapState = LRG_NOT_CFG; cfm->cfm.status = LCM_PRIM_OK; cfm->cfm.reason = LCM_REASON_NOT_APPL; @@ -1007,14 +755,14 @@ Pst *cfmPst; * **********************************************************/ #ifdef ANSI -PUBLIC Void SchFillCfmPst +Void SchFillCfmPst ( Pst *reqPst, Pst *cfmPst, RgMngmt *cfm ) #else -PUBLIC Void SchFillCfmPst(reqPst, cfmPst, cfm) +Void SchFillCfmPst(reqPst, cfmPst, cfm) Pst *reqPst; Pst *cfmPst; RgMngmt *cfm; @@ -1022,20 +770,16 @@ RgMngmt *cfm; { Inst inst; - TRC2(SchFillCfmPst) - inst = (reqPst->dstInst - SCH_INST_START); - cfmPst->srcEnt = rgSchCb[inst].rgSchInit.ent; - cfmPst->srcInst = (Inst) 0; + cfmPst->srcEnt = ENTMAC; + cfmPst->srcInst = (Inst) 1; cfmPst->srcProcId = rgSchCb[inst].rgSchInit.procId; - cfmPst->dstEnt = reqPst->srcEnt; + cfmPst->dstEnt = ENTMAC; cfmPst->dstInst = (Inst) 0; cfmPst->dstProcId = reqPst->srcProcId; cfmPst->selector = cfm->hdr.response.selector; - cfmPst->prior = cfm->hdr.response.prior; - cfmPst->route = cfm->hdr.response.route; cfmPst->region = cfm->hdr.response.mem.region; cfmPst->pool = cfm->hdr.response.mem.pool; @@ -1062,7 +806,7 @@ RgMngmt *cfm; * -# ROK **/ #ifdef ANSI -PUBLIC S16 rgSCHLmmStartTmr +S16 rgSCHLmmStartTmr ( Inst inst, S16 tmrEvnt, /* Timer Event */ @@ -1070,7 +814,7 @@ U32 tmrVal, /* Wait Time */ PTR cb /* Entry for which Timer Expired */ ) #else -PUBLIC S16 rgSCHLmmStartTmr(inst, tmrEvnt, tmrVal, cb) +S16 rgSCHLmmStartTmr(inst, tmrEvnt, tmrVal, cb) Inst inst; /* scheduler instance ID */ S16 tmrEvnt; /* Timer Event */ U32 tmrVal; /* Wait Time */ @@ -1080,12 +824,10 @@ PTR cb; /* Entry for which Timer Expired */ CmTmrArg arg; /* Inst dInst = inst + SCH_INST_START; */ - TRC2(rgSCHLmmStartTmr) - UNUSED(tmrEvnt); /* Initialize the arg structure */ - cmMemset((U8 *)&arg, 0, sizeof(CmTmrArg)); + memset(&arg, 0, sizeof(CmTmrArg)); arg.tqCp = &rgSchCb[inst].tmrTqCp; arg.tq = rgSchCb[inst].tmrTq; @@ -1097,7 +839,7 @@ PTR cb; /* Entry for which Timer Expired */ arg.wait = tmrVal; cmPlcCbTq(&arg); - RETVALUE(ROK); + return ROK; } @@ -1121,14 +863,14 @@ PTR cb; /* Entry for which Timer Expired */ * -# RFAILED **/ #ifdef ANSI -PUBLIC S16 rgSCHLmmStopTmr +S16 rgSCHLmmStopTmr ( Inst inst, /* Scheduler instance */ S16 tmrEvnt, /* Timer Event */ PTR cb /* Entry for which Timer Expired */ ) #else -PUBLIC S16 rgSCHLmmStopTmr(inst, tmrEvnt, cb) +S16 rgSCHLmmStopTmr(inst, tmrEvnt, cb) Inst inst; /* Scheduler instance */ S16 tmrEvnt; /* Timer Event */ PTR cb; /* Entry for which Timer Expired */ @@ -1138,8 +880,6 @@ PTR cb; /* Entry for which Timer Expired */ U8 i; S16 ret; - TRC2(rgSCHLmmStopTmr) - ret = RFAILED; for(i=0;itmrBlk.tmrEvnt == tmrEvnt) { /* Initialize the arg structure */ - cmMemset((U8 *)&arg, 0, sizeof(CmTmrArg)); + memset(&arg, 0, sizeof(CmTmrArg)); arg.tqCp = &rgSchCb[inst].tmrTqCp; arg.tq = rgSchCb[inst].tmrTq; @@ -1166,7 +906,7 @@ PTR cb; /* Entry for which Timer Expired */ } - RETVALUE(ret); + return (ret); } @@ -1187,13 +927,13 @@ PTR cb; /* Entry for which Timer Expired */ * -# ROK **/ #ifdef ANSI -PUBLIC S16 rgSCHLmmTmrExpiry +S16 rgSCHLmmTmrExpiry ( PTR cb, /* Pointer to timer control block */ S16 tmrEvnt /* Timer Event */ ) #else -PUBLIC S16 rgSCHLmmTmrExpiry(cb,tmrEvnt) +S16 rgSCHLmmTmrExpiry(cb,tmrEvnt) PTR cb; /* Pointer to timer control block */ S16 tmrEvnt; /* Timer Event */ #endif @@ -1203,7 +943,6 @@ S16 tmrEvnt; /* Timer Event */ #ifdef DEBUGP Inst inst = tfuSap->cell->instIdx; #endif - TRC2(rgSCHLmmTmrExpiry) switch(tmrEvnt) @@ -1237,7 +976,7 @@ S16 tmrEvnt; /* Timer Event */ ret = RFAILED; break; } - RETVALUE(ret); + return (ret); } @@ -1262,14 +1001,14 @@ S16 tmrEvnt; /* Timer Event */ * -# ROK **/ #ifdef ANSI -PUBLIC S16 rgSCHLmmBndCfm +S16 rgSCHLmmBndCfm ( Pst *pst, /* Post Structure */ SuId suId, /* Service user ID */ U8 status /* Status */ ) #else -PUBLIC S16 rgSCHLmmBndCfm(pst,suId,status) +S16 rgSCHLmmBndCfm(pst,suId,status) Pst *pst; /* Post Structure */ SuId suId; /* Service user Id */ U8 status; /* Status */ @@ -1280,8 +1019,6 @@ U8 status; /* Status */ Pst cfmPst; Inst inst = (pst->dstInst - SCH_INST_START); /* scheduler instance */ - TRC2(rgSCHLmmBndCfm) - /* check the SAP State */ switch(rgSchCb[inst].tfuSap[suId].sapSta.sapState) @@ -1290,9 +1027,9 @@ U8 status; /* Status */ break; case LRG_BND: /* SAP is already bound */ - RETVALUE(ROK); + return ROK; default: - RETVALUE(RFAILED); + return RFAILED; } cfmPst = rgSchCb[inst].rgSchInit.lmPst; @@ -1302,7 +1039,7 @@ U8 status; /* Status */ cfmPst.region = rgSchCb[inst].genCfg.bndCfmResp[suId].response.mem.region; cfmPst.pool = rgSchCb[inst].genCfg.bndCfmResp[suId].response.mem.pool; - cmMemset((U8 *)&cntrlCfm, 0, sizeof(RgMngmt)); + memset(&cntrlCfm, 0, sizeof(RgMngmt)); switch(status) { @@ -1340,7 +1077,7 @@ U8 status; /* Status */ ret = RgMiLrgSchCntrlCfm(&cfmPst, &cntrlCfm); - RETVALUE(ret); + return (ret); } /** @@ -1361,7 +1098,7 @@ U8 status; /* Status */ * -# ROK **/ #ifdef ANSI -PUBLIC S16 rgSCHLmmStaInd +S16 rgSCHLmmStaInd ( Inst inst, U16 category, @@ -1370,7 +1107,7 @@ U16 cause, RgUstaDgn *dgn ) #else -PUBLIC S16 rgSCHLmmStaInd(inst, category, event, cause, dgn) +S16 rgSCHLmmStaInd(inst, category, event, cause, dgn) Inst inst; U16 category; U16 event; @@ -1380,14 +1117,12 @@ RgUstaDgn *dgn; { RgMngmt usta; - TRC2(rgSCHLmmStaInd) - if(rgSchCb[inst].rgSchInit.usta == FALSE) { - RETVALUE(ROK); + return ROK; } - cmMemset((U8 *)&usta, 0, sizeof(RgMngmt)); + memset(&usta, 0, sizeof(RgMngmt)); SGetDateTime(&usta.t.usta.cmAlarm.dt); usta.t.usta.cmAlarm.category = category; @@ -1395,7 +1130,7 @@ RgUstaDgn *dgn; usta.t.usta.cmAlarm.cause = cause; if (dgn != NULLP) { - cmMemcpy((U8 *)&usta.t.usta.dgn, (U8 *)dgn, sizeof(RgUstaDgn)); + memcpy(&usta.t.usta.dgn, dgn, sizeof(RgUstaDgn)); } rgSchCb[inst].rgSchInit.lmPst.selector = @@ -1410,7 +1145,7 @@ RgUstaDgn *dgn; rgSchCb[inst].genCfg.ustaResp.response.mem.pool; usta.hdr.transId = rgSchCb[inst].genCfg.ustaResp.transId; - RETVALUE(RgMiLrgSchStaInd(&rgSchCb[inst].rgSchInit.lmPst, &usta)); + return (RgMiLrgSchStaInd(&rgSchCb[inst].rgSchInit.lmPst, &usta)); } @@ -1431,25 +1166,24 @@ RgUstaDgn *dgn; * -# ROK **/ #ifdef ANSI -PUBLIC S16 schActvTmr +S16 schActvTmr ( Ent ent, Inst inst ) #else -PUBLIC S16 schActvTmr(ent, inst) +S16 schActvTmr(ent, inst) Ent ent; Inst inst; #endif { Inst schInst = (inst - SCH_INST_START); - TRC2(schActvTmr) /* Check if any timer in the scheduler instance has expired */ cmPrcTmr(&rgSchCb[schInst].tmrTqCp, rgSchCb[schInst].tmrTq, (PFV) rgSCHLmmTmrExpiry); - RETVALUE(ROK); + return ROK; } /* end of schActvTmr */