[Epic-ID: ODUHIGH-475][Task-ID: ODUHIGH-476]Integration fixes upto PRACH scheduling...
[o-du/l2.git] / src / cm / cm_mblk.c
index 630c62c..03c4583 100644 (file)
 
 
 /* header include files (.h) */
-#include "envopt.h"        /* environment options */
-#include "envdep.h"        /* environment dependent */
-#include "envind.h"        /* environment independent */
-#include "gen.h"           /* general layer */
-#include "ssi.h"           /* system services */
-#include "cm_mblk.h"       /* Header file */
-
-/* header/extern include files (.x) */
-#include "gen.x"           /* general layer */
-#include "ssi.x"           /* system services */
-#include "cm_lib.x"        /* Common library */
-#include "cm_mblk.x"       /* Typedef file */
+#include "common_def.h"       /* Header file */
 
 #ifdef SS_LOCKLESS_MEMORY
 pthread_t tmpRegTidMap[20];
@@ -102,12 +91,12 @@ Ptr             *ptr         /* Location to place allocated event ptr */
 #ifndef LTE_ENB_PAL
   if( evntSize > maxBlkSize)
   {
-     printf("\nNot Allocating memory for Event\n");
+     DU_LOG("\nERROR  -->  Not Allocating memory for Event\n");
 #ifdef ALIGN_64BIT
-     printf("eventSize [%d] greater than maxBlkSize [%d]\n",
+     DU_LOG("\nERROR  -->  eventSize [%d] greater than maxBlkSize [%d]\n",
            evntSize, maxBlkSize);
 #else
-     printf("eventSize [%ld] greater than maxBlkSize [%ld]\n",
+     DU_LOG("\nERROR  -->  eventSize [%ld] greater than maxBlkSize [%ld]\n",
            evntSize, maxBlkSize);
 #endif
      return RFAILED;
@@ -117,10 +106,10 @@ Ptr             *ptr         /* Location to place allocated event ptr */
   /* Allocate memory for the first Memory Chunk */
   /* Allocated memory should be maxBlkSize + sizeof(CmMemList) */
 #ifdef SS_LOCKLESS_MEMORY
-   if(SGetStaticBuffer(sMem->region, sMem->pool, (Data **)&allocPtr,
+   if(SGetStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,sMem->region, sMem->pool, (Data **)&allocPtr,
                        (Size)(maxBlkSize + sizeof(CmMemList)), 0) != ROK)
 #else
-  if (SGetSBuf(sMem->region, sMem->pool, 
+  if (SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,sMem->region, sMem->pool, 
                (Data **)&allocPtr, 
                (Size)(maxBlkSize + sizeof(CmMemList))) != ROK)
 #endif /* SS_LOCKLESS_MEMORY */
@@ -271,11 +260,11 @@ Ptr           *allocPtr  /* location to place pointer */
   /* Allocate buffer */
   /* cm_mblk_c_001.101: use blkSize instead of cb->maxSize */
 #ifdef SS_LOCKLESS_MEMORY
-   if(SGetStaticBuffer(cb->sMem.region, cb->sMem.pool, 
+   if(SGetStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,cb->sMem.region, cb->sMem.pool, 
                        (Data **)&(cb->initPtr),
                        (Size)(blkSize + sizeof(CmMemList)), 0) != ROK)
 #else
-  if (SGetSBuf(cb->sMem.region, cb->sMem.pool, 
+  if (SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,cb->sMem.region, cb->sMem.pool, 
               (Data **)&(cb->initPtr),
               (Size)(blkSize + sizeof(CmMemList)) )  != ROK)
 #endif /* SS_LOCKLESS_MEMORY */
@@ -355,10 +344,10 @@ Ptr             *ptr         /* Location to place allocated event ptr */
   /* Allocate memory for the first Memory Chunk */
   /* Allocated memory should be maxBlkSize + sizeof(CmMemList) */
 #ifdef SS_LOCKLESS_MEMORY
-   if(SGetStaticBuffer(sMem->region, sMem->pool, (Data **)&allocPtr,
+   if(SGetStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,sMem->region, sMem->pool, (Data **)&allocPtr,
                        (Size)(maxBlkSize + sizeof(CmMemList)), 0) != ROK)
 #else
-  if (SGetSBuf(sMem->region, sMem->pool, 
+  if (SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,sMem->region, sMem->pool, 
                (Data **)&allocPtr, 
                (Size)(maxBlkSize + sizeof(CmMemList))) != ROK)
 #endif /* SS_LOCKLESS_MEMORY */
@@ -479,11 +468,11 @@ Ptr           *allocPtr  /* location to place pointer */
   /* Allocate buffer */
   /* cm_mblk_c_001.101: use blkSize instead of cb->maxSize */
 #ifdef SS_LOCKLESS_MEMORY
-   if(SGetStaticBuffer(cb->sMem.region, cb->sMem.pool, 
+   if(SGetStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,cb->sMem.region, cb->sMem.pool, 
                        (Data **)&(cb->initPtr),
                        (Size)(blkSize + sizeof(CmMemList)), 0) != ROK)
 #else
-  if (SGetSBuf(cb->sMem.region, cb->sMem.pool, 
+  if (SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,cb->sMem.region, cb->sMem.pool, 
               (Data **)&(cb->initPtr),
               (Size)(blkSize + sizeof(CmMemList)) )  != ROK)
 #endif /* SS_LOCKLESS_MEMORY */
@@ -578,10 +567,10 @@ Ptr    memPtr      /* Link List CP */
     if( node )
     {
 #ifdef SS_LOCKLESS_MEMORY
-       SPutStaticBuffer(sMem.region, sMem.pool,
+       SPutStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,sMem.region, sMem.pool,
                         (Data *)node, (node->size + sizeof(CmMemList)), 0);
 #else
-       SPutSBuf(sMem.region,sMem.pool, 
+       SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,sMem.region,sMem.pool, 
                 (Data *)node, (node->size + sizeof(CmMemList)));
 #endif /* SS_LOCKLESS_MEMORY */
     }