[Epic-ID: ODUHIGH-464][Task-ID: ODUHIGH-483] Memeory related fix in FDD and TDD mode
[o-du/l2.git] / src / 5gnrsch / rg_sch_inf.c
index 88aacb1..ff63354 100755 (executable)
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkMacSchUeDelInd
-(
-Pst* pst,
-RgInfUeDelInd*  ueDelInd
-)
-#else
-S16 cmPkMacSchUeDelInd(pst, ueDelInd)
-Pst* pst;
-RgInfUeDelInd*  ueDelInd;
-#endif
+S16 cmPkMacSchUeDelInd(Pst* pst,RgInfUeDelInd*  ueDelInd)
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkMacSchUeDelInd)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) 
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) 
    {
       return RFAILED;
    }
@@ -107,24 +95,10 @@ RgInfUeDelInd*  ueDelInd;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkMacSchUeDelInd
-(
-UeDelInd func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-S16 cmUnpkMacSchUeDelInd(func, pst, mBuf)
-UeDelInd func;
-Pst *pst;
-Buffer *mBuf;
-#endif
+S16 cmUnpkMacSchUeDelInd(UeDelInd func,Pst *pst,Buffer *mBuf)
 {
    RgInfUeDelInd ueDelInd;
    
-   TRC2(cmUnpkMacSchUeDelInd)
-
    if(SRemPreMsgMult((Data *)&ueDelInd, sizeof(RgInfUeDelInd), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -151,22 +125,11 @@ Buffer *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkMacSchDedBoUpdtReq
-(
-Pst* pst,
-RgInfDedBoRpt* boRpt
-)
-#else
-S16 cmPkMacSchDedBoUpdtReq(pst, boRpt)
-Pst* pst;
-RgInfDedBoRpt* boRpt;
-#endif
+S16 cmPkMacSchDedBoUpdtReq(Pst* pst,RgInfDedBoRpt* boRpt)
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkMacSchDedBoUpdtReq)
 
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -198,24 +161,10 @@ RgInfDedBoRpt* boRpt;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkMacSchDedBoUpdtReq
-(
-DedBoUpdtReq func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-S16 cmUnpkMacSchDedBoUpdtReq(func, pst, mBuf)
-DedBoUpdtReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
+S16 cmUnpkMacSchDedBoUpdtReq(DedBoUpdtReq func,Pst *pst,Buffer *mBuf)
 {
    RgInfDedBoRpt boRpt;
    
-   TRC2(cmUnpkMacSchDedBoUpdtReq)
-
    if(SRemPreMsgMult((Data *)&boRpt, sizeof(RgInfDedBoRpt), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -239,22 +188,11 @@ Buffer *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkMacSchCmnBoUpdtReq
-(
-Pst* pst,
-RgInfCmnBoRpt* boRpt
-)
-#else
-S16 cmPkMacSchCmnBoUpdtReq(pst, boRpt)
-Pst* pst;
-RgInfCmnBoRpt* boRpt;
-#endif
+S16 cmPkMacSchCmnBoUpdtReq(Pst* pst,RgInfCmnBoRpt* boRpt)
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkMacSchCmnBoUpdtReq)
 
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -286,24 +224,10 @@ RgInfCmnBoRpt* boRpt;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkMacSchCmnBoUpdtReq
-(
-CmnBoUpdtReq func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-S16 cmUnpkMacSchCmnBoUpdtReq(func, pst, mBuf)
-CmnBoUpdtReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
+S16 cmUnpkMacSchCmnBoUpdtReq(CmnBoUpdtReq func,Pst *pst,Buffer *mBuf)
 {
    RgInfCmnBoRpt boRpt;
    
-   TRC2(cmUnpkMacSchCmnBoUpdtReq)
-
    if(SRemPreMsgMult((Data *)&boRpt, sizeof(RgInfCmnBoRpt), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -327,22 +251,11 @@ Buffer *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkMacSchSfRecpInd
-(
-Pst* pst,
-RgInfSfDatInd*  datInd
-)
-#else
-S16 cmPkMacSchSfRecpInd(pst, datInd)
-Pst* pst;
-RgInfSfDatInd*  datInd;
-#endif
+S16 cmPkMacSchSfRecpInd(Pst* pst,RgInfSfDatInd*  datInd)
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkMacSchSfRecpInd)
 
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -371,24 +284,10 @@ RgInfSfDatInd*  datInd;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkMacSchSfRecpInd
-(
-SfRecpInd func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-S16 cmUnpkMacSchSfRecpInd(func, pst, mBuf)
-SfRecpInd func;
-Pst *pst;
-Buffer *mBuf;
-#endif
+S16 cmUnpkMacSchSfRecpInd(SfRecpInd func,Pst *pst,Buffer *mBuf)
 {
    RgInfSfDatInd* datInd;
    
-   TRC2(cmUnpkMacSchCmnBoUpdtReq)
-
    if(oduUnpackPointer((PTR *)&datInd, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -413,23 +312,11 @@ Buffer *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkMacSchSpsRelInd
-(
-Pst*                 pst,
-RgInfSpsRelInfo*     relInfo
-)
-#else
-S16 cmPkMacSchSpsRelInd(pst, relInfo)
-Pst*                 pst;
-RgInfSpsRelInfo*     relInfo;
-#endif
+S16 cmPkMacSchSpsRelInd(Pst* pst,RgInfSpsRelInfo* relInfo)
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkMacSchSpsRelInd)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -456,24 +343,10 @@ RgInfSpsRelInfo*     relInfo;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkMacSchSpsRelInd
-(
-SpsRelInd      func,
-Pst            *pst,
-Buffer         *mBuf
-)
-#else
-S16 cmUnpkMacSchSpsRelInd(func, pst, mBuf)
-SpsRelInd      func;
-Pst            *pst;
-Buffer         *mBuf;
-#endif
+S16 cmUnpkMacSchSpsRelInd(SpsRelInd func,Pst *pst,Buffer *mBuf)
 {
    RgInfSpsRelInfo *relInfo;
    
-   TRC2(cmUnpkMacSchSpsRelInd)
-
    if(oduUnpackPointer((PTR *)&relInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -501,22 +374,11 @@ Buffer         *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkSchMacSfAllocReq
-(
-Pst* pst,
-RgInfSfAlloc*   resAllocReq
-)
-#else
-S16 cmPkSchMacSfAllocReq(pst, resAllocReq)
-Pst* pst;
-RgInfSfAlloc*   resAllocReq;
-#endif
+S16 cmPkSchMacSfAllocReq(Pst* pst,RgInfSfAlloc* resAllocReq)
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkSchMacSfAllocReq)
 
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -545,24 +407,10 @@ RgInfSfAlloc*   resAllocReq;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkSchMacSfAllocReq
-(
-SfAllocReq func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-S16 cmUnpkSchMacSfAllocReq(func, pst, mBuf)
-SfAllocReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
+S16 cmUnpkSchMacSfAllocReq(SfAllocReq func,Pst *pst,Buffer *mBuf)
 {
    RgInfSfAlloc* resAllocReq;
    
-   TRC2(cmUnpkSchMacSfAllocReq)
-
    if(oduUnpackPointer((PTR *)&resAllocReq, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -584,22 +432,11 @@ Buffer *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkSchMacRstHqEntReq
-(
-Pst*                 pst,
-RgInfResetHqEnt*     hqEntInfo
-)
-#else
-S16 cmPkSchMacRstHqEntReq(pst, sfHqInfo)
-Pst*                 pst,    
-RgInfResetHqEnt*     hqEntInfo
-#endif
+S16 cmPkSchMacRstHqEntReq(Pst*  pst,RgInfResetHqEnt* hqEntInfo)
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkSchMacRstHqEntReq)
 
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -625,24 +462,10 @@ RgInfResetHqEnt*     hqEntInfo
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkSchMacRstHqEntReq
-(
-RstHqEntReq func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-S16 cmUnpkSchMacRstHqEntReq(func, pst, mBuf)
-RstHqEntReq func,
-Pst *pst,
-Buffer *mBuf
-#endif
+S16 cmUnpkSchMacRstHqEntReq(RstHqEntReq func,Pst *pst,Buffer *mBuf)
 {
    RgInfResetHqEnt* hqEntRstInfo;
    
-   TRC2(cmUnpkSchMacRstHqEntReq)
-
    if(oduUnpackPointer((PTR *)&hqEntRstInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -667,22 +490,11 @@ Buffer *mBuf
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkSchMacRlsHqReq
-(
-Pst* pst,
-RgInfRlsHqInfo* sfHqInfo
-)
-#else
-S16 cmPkSchMacRlsHqReq(pst, sfHqInfo)
-Pst* pst;
-RgInfRlsHqInfo* sfHqInfo;
-#endif
+S16 cmPkSchMacRlsHqReq(Pst* pst,RgInfRlsHqInfo* sfHqInfo)
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkSchMacRlsHqReq)
 
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -710,24 +522,10 @@ RgInfRlsHqInfo* sfHqInfo;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkSchMacRlsHqReq
-(
-RlsHqReq func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-S16 cmUnpkSchMacRlsHqReq(func, pst, mBuf)
-RlsHqReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
+S16 cmUnpkSchMacRlsHqReq(RlsHqReq func,Pst *pst,Buffer *mBuf)
 {
    RgInfRlsHqInfo* sfHqInfo;
    
-   TRC2(cmUnpkSchMacRlsHqReq)
-
    if(oduUnpackPointer((PTR *)&sfHqInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -751,22 +549,11 @@ Buffer *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkSchMacRlsRntiReq
-(
-Pst* pst,
-RgInfRlsRnti* rlsRnti
-)
-#else
-S16 cmPkSchMacRlsRntiReq(pst, rlsRnti)
-Pst* pst;
-RgInfRlsRnti* rlsRnti;
-#endif
+S16 cmPkSchMacRlsRntiReq(Pst* pst,RgInfRlsRnti* rlsRnti)
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkSchMacRlsRntiReq)
 
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -797,24 +584,10 @@ RgInfRlsRnti* rlsRnti;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkSchMacRlsRntiReq
-(
-RlsRntiReq func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-S16 cmUnpkSchMacRlsRntiReq(func, pst, mBuf)
-RlsRntiReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
+S16 cmUnpkSchMacRlsRntiReq(RlsRntiReq func,Pst *pst,Buffer *mBuf)
 {
    RgInfRlsRnti rlsRnti;
    
-   TRC2(cmUnpkSchMacRlsRntiReq)
-
    if(SRemPreMsgMult((Data *)&rlsRnti, sizeof(RgInfRlsRnti), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -839,22 +612,11 @@ Buffer *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkSchMacCellRegReq
-(
-Pst* pst,
-RgInfCellReg* regReq
-)
-#else
-S16 cmPkSchMacCellRegReq(pst, regReq)
-Pst* pst;
-RgInfCellReg* regReq;
-#endif
+S16 cmPkSchMacCellRegReq(Pst* pst,RgInfCellReg* regReq)
 {
    Buffer *mBuf = NULLP;
-   TRC2(cmPkSchMacCellRegReq)
 
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -885,24 +647,10 @@ RgInfCellReg* regReq;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkSchMacCellRegReq
-(
-CellRegReq func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-S16 cmUnpkSchMacCellRegReq(func, pst, mBuf)
-CellRegReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
+S16 cmUnpkSchMacCellRegReq(CellRegReq func,Pst *pst,Buffer *mBuf)
 {
    RgInfCellReg regReq;
    
-   TRC2(cmUnpkSchMacCellRegReq)
-
    if(SRemPreMsgMult((Data *)&regReq, sizeof(RgInfCellReg), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -925,23 +673,11 @@ Buffer *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkSchMacLcgRegReq
-(
-Pst*                 pst,
-RgInfLcgRegReq       *lcgRegReq
-)
-#else
-S16 cmPkSchMacLcgRegReq(pst, lcgRegReq)
-Pst*                 pst;
-RgInfLcgRegReq       *lcgRegReq;
-#endif
+S16 cmPkSchMacLcgRegReq(Pst* pst,RgInfLcgRegReq *lcgRegReq)
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacLcgRegReq)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -968,24 +704,10 @@ RgInfLcgRegReq       *lcgRegReq;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkSchMacLcgRegReq
-(
-LcgReg         func,
-Pst            *pst,
-Buffer         *mBuf
-)
-#else
-S16 cmUnpkSchMacLcgRegReq(func, pst, mBuf)
-LcgReg         func;
-Pst            *pst;
-Buffer         *mBuf;
-#endif
+S16 cmUnpkSchMacLcgRegReq(LcgReg func,Pst *pst,Buffer *mBuf)
 {
    RgInfLcgRegReq       *lcgRegReq;
    
-   TRC2(cmUnpkSchMacLcgRegReq)
-
    if(oduUnpackPointer((PTR *)&lcgRegReq, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -1010,23 +732,11 @@ Buffer         *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkSchMacSpsLcRegReq
-(
-Pst*                 pst,
-RgInfSpsLcInfo       *lcInfo
-)
-#else
-S16 cmPkSchMacSpsLcRegReq(pst, lcInfo)
-Pst*                 pst;
-RgInfSpsLcInfo       *lcInfo;
-#endif
+S16 cmPkSchMacSpsLcRegReq(Pst*  pst,RgInfSpsLcInfo *lcInfo)
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacSpsLcRegReq)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -1052,23 +762,11 @@ RgInfSpsLcInfo       *lcInfo;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkSchMacUlSpsResetReq
-(
-Pst*                 pst,
-RgInfUlSpsReset      *ulSpsResetInfo
-)
-#else
-S16 cmPkSchMacUlSpsResetReq(pst, ulSpsResetInfo)
-Pst*                 pst;
-RgInfUlSpsReset       *ulSpsResetInfo;
-#endif
+S16 cmPkSchMacUlSpsResetReq(Pst*  pst,RgInfUlSpsReset  *ulSpsResetInfo)
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacUlSpsResetReq)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -1095,24 +793,10 @@ RgInfUlSpsReset       *ulSpsResetInfo;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkSchMacSpsLcRegReq
-(
-SpsLcReg       func,
-Pst            *pst,
-Buffer         *mBuf
-)
-#else
-S16 cmUnpkSchMacSpsLcRegReq(func, pst, mBuf)
-SpsLcReg       func;
-Pst            *pst;
-Buffer         *mBuf;
-#endif
+S16 cmUnpkSchMacSpsLcRegReq(SpsLcReg func,Pst *pst,Buffer *mBuf)
 {
    RgInfSpsLcInfo       *lcInfo;
    
-   TRC2(cmUnpkSchMacSpsLcRegReq)
-
    if(oduUnpackPointer((PTR *)&lcInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -1138,24 +822,10 @@ Buffer         *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkSchMacUlSpsResetReq
-(
-UlSpsReset       func,
-Pst            *pst,
-Buffer         *mBuf
-)
-#else
-S16 cmUnpkSchMacUlSpsResetReq(func, pst, mBuf)
-UlSpsReset       func;
-Pst            *pst;
-Buffer         *mBuf;
-#endif
+S16 cmUnpkSchMacUlSpsResetReq(UlSpsReset func,Pst *pst,Buffer  *mBuf)
 {
    RgInfUlSpsReset       *ulSpsResetInfo;
    
-   TRC2(cmUnpkSchMacUlSpsResetReq)
-
    if(oduUnpackPointer((PTR *)&ulSpsResetInfo, mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -1181,25 +851,11 @@ Buffer         *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkSchMacSpsLcDeregReq
-(
-Pst*                 pst,
-CmLteCellId          cellId,
-CmLteRnti            crnti
-)
-#else
-S16 cmPkSchMacSpsLcDeregReq(pst, cellId, crnti)
-Pst*                 pst;
-CmLteCellId          cellId;
-CmLteRnti            crnti;
-#endif
+S16 cmPkSchMacSpsLcDeregReq(Pst* pst,CmLteCellId cellId,CmLteRnti  crnti)
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacSpsLcDeregReq)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -1223,25 +879,11 @@ CmLteRnti            crnti;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkSchMacSpsLcDeregReq
-(
-SpsLcDereg     func,
-Pst            *pst,
-Buffer         *mBuf
-)
-#else
-S16 cmUnpkSchMacSpsLcDeregReq(func, pst, mBuf)
-SpsLcDereg     func;
-Pst            *pst;
-Buffer         *mBuf;
-#endif
+S16 cmUnpkSchMacSpsLcDeregReq(SpsLcDereg func,Pst  *pst, Buffer *mBuf)
 {
    CmLteCellId  cellId;
    CmLteRnti    crnti;
    
-   TRC2(cmUnpkSchMacSpsLcDeregReq)
-
    CMCHKUNPK(cmUnpkLteRnti, &crnti, mBuf);
    CMCHKUNPK(cmUnpkLteCellId, &cellId, mBuf);
 
@@ -1264,23 +906,11 @@ Buffer         *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkSchMacL2MeasReq
-(
-Pst*                 pst,
-RgInfL2MeasReq      *measInfo
-)
-#else
-S16 cmPkSchMacL2MeasReq(pst, measInfo)
-Pst*                 pst;
-RgInfL2MeasReq      *measInfo;
-#endif
+S16 cmPkSchMacL2MeasReq(Pst* pst,RgInfL2MeasReq  *measInfo)
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacL2MeasReq)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
    if(SAddPstMsgMult((Data *)measInfo, sizeof(RgInfL2MeasReq), mBuf) != ROK)
@@ -1305,28 +935,16 @@ RgInfL2MeasReq      *measInfo;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkSchMacL2MeasStopReq
-(
-Pst*                 pst,
-RgInfL2MeasStopReq *measInfo
-)
-#else
-S16 cmPkSchMacL2MeasStopReq(pst, measInfo)
-Pst*                 pst;
-RgInfL2MeasStopReq *measInfo;
-#endif
+S16 cmPkSchMacL2MeasStopReq(Pst*  pst,RgInfL2MeasStopReq *measInfo)
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacL2MeasStopReq)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
        return RFAILED;
   }
    if(SAddPstMsgMult((Data *)measInfo, sizeof(RgInfL2MeasStopReq), mBuf) != ROK)
    {
-      SPutMsg(mBuf);
+      ODU_PUT_MSG_BUF(mBuf);
       return RFAILED;
    }
 
@@ -1345,28 +963,17 @@ RgInfL2MeasStopReq *measInfo;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkSchMacL2MeasSendReq
-(
-Pst*                 pst,
-RgInfL2MeasSndReq *measInfo
-)
-#else
-S16 cmPkSchMacL2MeasSendReq(pst, measInfo)
-Pst*                 pst;
-RgInfL2MeasSndReq *measInfo;
-#endif
+S16 cmPkSchMacL2MeasSendReq(Pst* pst,RgInfL2MeasSndReq *measInfo)
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkSchMacL2MeasSendReq)
- if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
        return RFAILED;
   }
 
    if(SAddPstMsgMult((Data *)measInfo, sizeof(RgInfL2MeasSndReq), mBuf) != ROK)
    {
-      SPutMsg(mBuf);
+      ODU_PUT_MSG_BUF(mBuf);
       return RFAILED;
    }
 
@@ -1387,24 +994,10 @@ RgInfL2MeasSndReq *measInfo;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkSchMacL2MeasReq
-(
-L2MeasReq      func,
-Pst            *pst,
-Buffer         *mBuf
-)
-#else
-S16 cmUnpkSchMacL2MeasReq(func, pst, mBuf)
-L2MeasReq      func;
-Pst            *pst;
-Buffer         *mBuf;
-#endif
+S16 cmUnpkSchMacL2MeasReq(L2MeasReq func,Pst *pst,Buffer *mBuf)
 {
    RgInfL2MeasReq      measInfo;
    
-   TRC2(cmUnpkSchMacL2MeasReq)
-
    if(SRemPreMsgMult((Data *)&measInfo, sizeof(RgInfL2MeasReq), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -1428,30 +1021,17 @@ Buffer         *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkSchMacL2MeasStopReq
-(
-L2MeasStopReq func,
-Pst            *pst,
-Buffer         *mBuf
-)
-#else
-S16 cmUnpkSchMacL2MeasStopReq(func, pst, mBuf)
-L2MeasStopReq      func;
-Pst            *pst;
-Buffer         *mBuf;
-#endif
+S16 cmUnpkSchMacL2MeasStopReq(L2MeasStopReq func,Pst *pst,Buffer *mBuf)
 {
    RgInfL2MeasStopReq measInfo;
 
-   TRC2(cmUnpkSchMacL2MeasStopReq)
    if(SRemPreMsgMult((Data *)&measInfo, sizeof(RgInfL2MeasStopReq), mBuf) != ROK)
    {
-      SPutMsg(mBuf);
+      ODU_PUT_MSG_BUF(mBuf);
       return RFAILED;
    }
 
-   SPutMsg(mBuf);
+   ODU_PUT_MSG_BUF(mBuf);
    return ((*func)(pst, &measInfo));
 } /* end of cmUnpkSchMacL2MeasReq */
 /**
@@ -1467,30 +1047,17 @@ Buffer         *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkSchMacL2MeasSendReq
-(
-L2MeasSendReq      func,
-Pst            *pst,
-Buffer         *mBuf
-)
-#else
-S16 cmUnpkSchMacL2MeasSendReq(func, pst, mBuf)
-L2MeasSendReq func;
-Pst            *pst;
-Buffer         *mBuf;
-#endif
+S16 cmUnpkSchMacL2MeasSendReq(L2MeasSendReq  func,Pst *pst,Buffer *mBuf)
 {
    RgInfL2MeasSndReq measInfo;
 
-   TRC2(cmUnpkSchMacL2MeasSendReq)
  if(SRemPreMsgMult((Data *)&measInfo, sizeof(RgInfL2MeasSndReq), mBuf) != ROK)  
    {
-      SPutMsg(mBuf);
+      ODU_PUT_MSG_BUF(mBuf);
       return RFAILED;
    }
 
-   SPutMsg(mBuf);
+   ODU_PUT_MSG_BUF(mBuf);
    return ((*func)(pst, &measInfo));
 } /* end of cmUnpkSchMacL2MeasSendReq*/
 
@@ -1506,23 +1073,11 @@ Buffer         *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkMacSchL2MeasCfm
-(
-Pst*                 pst,
-RgInfL2MeasCfm       *measCfm
-)
-#else
-S16 cmPkMacSchL2MeasCfm(pst, measCfm)
-Pst*                 pst;
-RgInfL2MeasCfm       *measCfm;
-#endif
+S16 cmPkMacSchL2MeasCfm(Pst*  pst,RgInfL2MeasCfm *measCfm)
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkMacSchL2MeasCfm)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+   if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
@@ -1549,28 +1104,17 @@ RgInfL2MeasCfm       *measCfm;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmPkMacSchL2MeasStopCfm
-(
-Pst*                 pst,
-RgInfL2MeasCfm       *measCfm
-)
-#else
-S16 cmPkMacSchL2MeasStopCfm(pst, measCfm)
-Pst*                 pst;
-RgInfL2MeasCfm       *measCfm;
-#endif
+S16 cmPkMacSchL2MeasStopCfm(Pst*  pst,RgInfL2MeasCfm  *measCfm)
 {
    Buffer *mBuf = NULLP;
 
-   TRC2(cmPkMacSchL2MeasStopCfm)
- if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) {
       return RFAILED;
    }
 
    if(SAddPstMsgMult((Data *)measCfm, sizeof(RgInfL2MeasCfm), mBuf) != ROK)
    {
-      SPutMsg(mBuf);
+      ODU_PUT_MSG_BUF(mBuf);
       return RFAILED;
    }
 
@@ -1590,24 +1134,10 @@ RgInfL2MeasCfm       *measCfm;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkMacSchL2MeasCfm
-(
-L2MeasCfm      func,
-Pst            *pst,
-Buffer         *mBuf
-)
-#else
-S16 cmUnpkMacSchL2MeasCfm(func, pst, mBuf)
-L2MeasCfm      func;
-Pst            *pst;
-Buffer         *mBuf;
-#endif
+S16 cmUnpkMacSchL2MeasCfm(L2MeasCfm func,Pst *pst,Buffer *mBuf)
 {
    RgInfL2MeasCfm      measCfm;
    
-   TRC2(cmUnpkMacSchL2MeasCfm)
-
    if(SRemPreMsgMult((Data *)&measCfm, sizeof(RgInfL2MeasCfm), mBuf) != ROK)
    {
       RGSCHINF_FREE_MSG(mBuf);
@@ -1631,31 +1161,17 @@ Buffer         *mBuf;
 *  @return   S16
 *      -# ROK
 **/
-#ifdef ANSI
-S16 cmUnpkMacSchL2MeasStopCfm
-(
-L2MeasCfm      func,
-Pst            *pst,
-Buffer         *mBuf
-)
-#else
-S16 cmUnpkMacSchL2MeasStopCfm(func, pst, mBuf)
-L2MeasCfm      func;
-Pst            *pst;
-Buffer         *mBuf;
-#endif
+S16 cmUnpkMacSchL2MeasStopCfm(L2MeasCfm func,Pst *pst,Buffer  *mBuf)
 {
-RgInfL2MeasCfm      measCfm;
-
-   TRC2(cmUnpkMacSchL2MeasStopCfm)
+   RgInfL2MeasCfm      measCfm;
 
    if(SRemPreMsgMult((Data *)&measCfm, sizeof(RgInfL2MeasCfm), mBuf) != ROK)
    {
-      SPutMsg(mBuf);
+      ODU_PUT_MSG_BUF(mBuf);
       return RFAILED;
    }
 
-   SPutMsg(mBuf);
+   ODU_PUT_MSG_BUF(mBuf);
    return ((*func)(pst, &measCfm));
 } /* end of cmUnpkMacSchL2MeasStopCfm */