remove/replaced PRIVATE and EXTERN keywords
[o-du/l2.git] / src / mt / mt_ss.c
index ea4ec29..4127603 100644 (file)
@@ -36,9 +36,6 @@
 #define _POSIX_C_SOURCE         199309L
 #endif
 /* mt003.301 moved env files to use the __USE_UNIX98 flag in sys includes */
-#include "envopt.h"        /* environment options */
-#include "envdep.h"        /* environment dependent */
-#include "envind.h"        /* environment independent */
 
 #include <fcntl.h>
 #include <pthread.h>
 /* header include files (.h) */
 
 
-#include "gen.h"           /* general layer */
-#include "ssi.h"           /* system services */
-
-#include "cm5.h"           /* common timers */
-
+#include "common_def.h"
 #include "mt_ss.h"         /* MTSS specific */
 #include "mt_err.h"        /* MTSS error defines */
 
@@ -78,7 +71,6 @@
 /* mt003.301 Additions - Task deregistration */
 #include "ss_err.h"        /* error */
 #include "cm_mem.h"        /* common memory manager */
-#include "cm_lte.h"        /* common lte param */
 /* mt001.301 : Additions */
 #ifdef SS_THREAD_PROFILE
 #include "ss_err.h"
 #endif
 
 #ifdef INTEL_WLS
-EXTERN void LwrMacRecvPhyMsg();
+void LwrMacRecvPhyMsg();
 #endif
 
 #if defined(SPLIT_RLC_DL_TASK) && defined(RLC_MAC_STA_RSP_RBUF)
-EXTERN S16 rgBatchProc (Void);
+S16 rgBatchProc (Void);
 #endif
 #ifdef RLC_MAC_DAT_REQ_RBUF
-EXTERN S16 rgDlDatReqBatchProc ARGS(( 
+S16 rgDlDatReqBatchProc ARGS(( 
          Void));
 #endif
 #if defined(SPLIT_RLC_DL_TASK) && defined(RLC_MAC_STA_RSP_RBUF)
-EXTERN S16 rgBatchProc ARGS((
+S16 rgBatchProc ARGS((
     Void));
 #endif  
 
@@ -211,12 +203,12 @@ Void cmPrcTmr ARGS((CmTqCp* tqCp, CmTqType* tq, PFV func));
 void            dump_external(void);
 
 #ifdef ANSI
-PRIVATE Void mtDelSigals
+static Void mtDelSigals
 (
 Void
 )
 #else
-PRIVATE Void mtDelSignals()
+static Void mtDelSignals()
 #endif
 {
    struct sigaction sa;
@@ -231,7 +223,7 @@ PRIVATE Void mtDelSignals()
    sa.sa_handler = SIG_DFL;
    sigaction(SIGILL, &sa, NULL);
 
-   RETVOID;
+   return;
 }
 static void signal_segv(int signum, siginfo_t * info, void *ptr)
 {
@@ -326,90 +318,90 @@ typedef struct _SPThreadCreateArg
    void *(*start_routine) (void *); /* function from which pthread starts */   
 }SPThreadCreateArg;
 
-PUBLIC void *pthreadCreateHdlr(void*  arg);
+void *pthreadCreateHdlr(void*  arg);
 
 #ifdef SS_LOCKLESS_MEMORY
-PUBLIC Buffer *mtTskBuffer1;
-PUBLIC Buffer *mtTskBuffer2;
+Buffer *mtTskBuffer1;
+Buffer *mtTskBuffer2;
 
-EXTERN pthread_t tmpRegTidMap[20];
-EXTERN U8 stopBtInfo;
-EXTERN  S16 SGlobMemInfoShow(void);
+pthread_t tmpRegTidMap[20];
+uint8_t stopBtInfo;
+ S16 SGlobMemInfoShow(void);
 #endif /* SS_LOCKLESS_MEMORY */
 
 #ifdef L2_L3_SPLIT
-EXTERN APP_CONTEXT AppContext;
-EXTERN S32 clusterMode;
+APP_CONTEXT AppContext;
+S32 clusterMode;
 #endif
 
 #ifdef TENB_T2K3K_SPECIFIC_CHANGES
-EXTERN unsigned int tlPost(void *handle);
+unsigned int tlPost(void *handle);
 #endif
 \f
 /* forward references */
 /* mt003.301 Modifications - Moved to ss_gen.x */
 #ifdef TENB_T2K3K_SPECIFIC_CHANGES
-PUBLIC Void *mtTskHdlrT2kL2 ARGS((Void*));
-PUBLIC  void mtSigSegvHndlr ARGS((void));
-PUBLIC  void mtSigUsr2Hndlr ARGS((void));
+Void *mtTskHdlrT2kL2 ARGS((Void*));
+ void mtSigSegvHndlr ARGS((void));
+ void mtSigUsr2Hndlr ARGS((void));
 #endif
 
-PRIVATE S16 ssdSetPthreadAttr ARGS ((S32 tskPrior, pthread_attr_t *attr));
-PRIVATE Void *mtTskHdlr ARGS((void *));
-PRIVATE S16 mtTskHdlMsg ARGS((SsSTskEntry *sTsk));
+static S16 ssdSetPthreadAttr ARGS ((S32 tskPrior, pthread_attr_t *attr));
+static Void *mtTskHdlr ARGS((void *));
+static S16 mtTskHdlMsg ARGS((SsSTskEntry *sTsk));
 
-PRIVATE Void *mtTmrHdlr ARGS((void *));
-PRIVATE Void mtTimeout ARGS((PTR tCb, S16 evnt));
+static Void *mtTmrHdlr ARGS((void *));
+static Void mtTimeout ARGS((PTR tCb, S16 evnt));
 
 /*mt010.301 Fix for core when run with -o option and when killed with SIGINT*/
-PRIVATE Void mtIntSigHndlr ARGS((int));
-PRIVATE Void mtExitClnup ARGS((void));
+static Void mtIntSigHndlr ARGS((int));
+static Void mtExitClnup ARGS((void));
 
 #ifdef CONAVL
-PRIVATE Void *mtConHdlr ARGS((void *));
+static Void *mtConHdlr ARGS((void *));
 #endif
 
 #ifndef L2_L3_SPLIT
 #ifdef SS_DRVR_SUPPORT
-PRIVATE Void *mtIsTskHdlr ARGS((void *));
+static Void *mtIsTskHdlr ARGS((void *));
 #endif
 #endif
 
 /* mt020.201 - Addition for no command line available */
 #ifndef NOCMDLINE
-PRIVATE Void mtGetOpts ARGS((void));
+static Void mtGetOpts ARGS((void));
 /* mt003.301 Additions - File Based task registration made
  * common for both MULTICORE and NON-MULTICORE
  */
-PRIVATE Bool fileBasedMemCfg = FALSE;
+static Bool fileBasedMemCfg = FALSE;
 #endif
 
 /* mt033.201 - addition of local function to print the statistics such as
 * (size vs. numAttempts) and (allocations vs. deallocations)
 */
 #ifdef SSI_DEBUG_LEVEL1
-PRIVATE S16 SPrintRegMemStats ARGS((Region region));
+static S16 SPrintRegMemStats ARGS((Region region));
 #endif /* SSI_DEBUG_LEVEL1 */
 \f
 #ifdef SS_MULTICORE_SUPPORT
-PRIVATE SsSTskEntry* ssdAddTmrSTsk(Void);
-PRIVATE SsSTskEntry* ssdReAddTmrSTsk ARGS((U8 idx));
+static SsSTskEntry* ssdAddTmrSTsk(Void);
+static SsSTskEntry* ssdReAddTmrSTsk ARGS((uint8_t idx));
 #ifndef SS_LOCKLESS_MEMORY
 #ifndef RGL_SPECIFIC_CHANGES
-PRIVATE S16 ssdInitMemInfo ARGS((void));
+static S16 ssdInitMemInfo ARGS((void));
 #endif
 #endif
 #endif
 
 /* mt005.301: Cavium changes */
 #ifdef SS_SEUM_CAVIUM
-PRIVATE Void *workRcvTsk ARGS((void *));
+static Void *workRcvTsk ARGS((void *));
 #endif /* SS_SEUM_CAVIUM */
 
 #ifdef SS_THR_REG_MAP
-PUBLIC S32 ssCheckAndAddMemoryRegionMap ARGS((pthread_t  threadId,
+S32 ssCheckAndAddMemoryRegionMap ARGS((pthread_t  threadId,
                                                Region region));
-PUBLIC S32 ssCheckAndDelMemoryRegionMap ARGS((pthread_t  threadId));
+S32 ssCheckAndDelMemoryRegionMap ARGS((pthread_t  threadId));
 #endif /* SS_THR_REG_MAP */
 \f
 /* type declarations */
@@ -417,8 +409,8 @@ PUBLIC S32 ssCheckAndDelMemoryRegionMap ARGS((pthread_t  threadId));
 #ifdef SS_DRVR_SUPPORT
 typedef struct mtIsFlag
 {
-   U16 id;
-   U8 action;
+   uint16_t id;
+   uint8_t  action;
 
 } MtIsFlag;
 #endif
@@ -427,13 +419,13 @@ typedef struct mtIsFlag
 \f
 /* public variable declarations */
 
-PUBLIC Cntr cfgNumRegs = SS_MAX_REGS;
+Cntr cfgNumRegs = SS_MAX_REGS;
 /* Set memory configuration as false.
  * Set to true if memory configuration through file is successfull.
  */
-PUBLIC Bool memConfigured = FALSE;
+Bool memConfigured = FALSE;
 /* mt022.201 - Modification for shared memory relay region and memcal tool */
-PUBLIC SsRegCfg cfgRegInfo[SS_MAX_REGS] =
+SsRegCfg cfgRegInfo[SS_MAX_REGS] =
 {
    {
       SS_DFLT_REGION, SS_MAX_POOLS_PER_REG - 1,
@@ -508,7 +500,7 @@ PUBLIC SsRegCfg cfgRegInfo[SS_MAX_REGS] =
  */
 
 #ifdef SS_LOCKLESS_MEMORY
-PUBLIC MtDynMemCfg mtDynMemoCfg =
+MtDynMemCfg mtDynMemoCfg =
 {
   SS_MAX_REGS,                                /* number of regions */
   {
@@ -585,7 +577,7 @@ PUBLIC MtDynMemCfg mtDynMemoCfg =
 
 };
 
-PUBLIC MtGlobMemCfg mtGlobMemoCfg =
+MtGlobMemCfg mtGlobMemoCfg =
 {
    MT_MAX_BKTS,                            /* number of buckets */
    {
@@ -607,7 +599,7 @@ PUBLIC MtGlobMemCfg mtGlobMemoCfg =
 
 /* mt022.201 - Modification for memory calculator tool */
 /* mt018.201 - added memory configuration matrix */
-PUBLIC MtMemCfg mtMemoCfg =
+MtMemCfg mtMemoCfg =
 {
 #ifdef  RY_ENBS5SHM
   SS_MAX_REGS - 1,                            /* number of regions */
@@ -713,28 +705,28 @@ PUBLIC MtMemCfg mtMemoCfg =
  * bucket info, as different regions may request for different no.
  * of blocks
  */
-PUBLIC MtBktCfg mtBktInfo[MT_MAX_BKTS];
-PUBLIC S16 msArgc;              /* argc */
-PUBLIC Txt **msArgv;            /* argv */
-PUBLIC S16 msOptInd;            /* SGetOpt vars */
-PUBLIC S8 *msOptArg;            /* SGetOpt vars */
+MtBktCfg mtBktInfo[MT_MAX_BKTS];
+S16 msArgc;              /* argc */
+Txt **msArgv;            /* argv */
+S16 msOptInd;            /* SGetOpt vars */
+S8 *msOptArg;            /* SGetOpt vars */
 
 
 #ifdef INTEL_WLS
 typedef struct _MtRegMemSz
 {
-   U32   reqdSz;
-   U8    *startAddr;
+   uint32_t   reqdSz;
+   uint8_t    *startAddr;
 }MtRegMemSz;
 
-PRIVATE MtRegMemSz mtRegMemSz[MT_MAX_BKTS+1];
+static MtRegMemSz mtRegMemSz[MT_MAX_BKTS+1];
 #endif
 
 \f
 /* private variable declarations */
 /* mt018.201 - change mtCMMRegCfg as array of pointers */
-PRIVATE CmMmRegCfg *mtCMMRegCfg[SS_MAX_REGS];
-PRIVATE CmMmRegCb *mtCMMRegCb[SS_MAX_REGS];
+static CmMmRegCfg *mtCMMRegCfg[SS_MAX_REGS];
+static CmMmRegCb *mtCMMRegCb[SS_MAX_REGS];
 /* mt003.301 - Fixed compilation warnings */
 /*mt004.301-addede new veriable for FAP*/
 /*mt010.301 - removed veriable defined for FA*/
@@ -761,11 +753,11 @@ void * mtGetWlsHdl()
 }
 
 #ifdef XEON_MULTIPLE_CELL_CHANGES
-EXTERN S8 gWrWlsDeviceName[MAX_WLS_DEVICE_NAME_LEN];
-EXTERN S16 smWrReadWlsConfigParams (Void);
+S8 gWrWlsDeviceName[MAX_WLS_DEVICE_NAME_LEN];
+S16 smWrReadWlsConfigParams (Void);
 #endif
 
-PRIVATE int SOpenWlsIntf()
+static int SOpenWlsIntf()
 {
    void *hdl;
    #define WLS_DEVICE_NAME "/dev/wls"
@@ -812,18 +804,17 @@ PRIVATE int SOpenWlsIntf()
 *
 */
 #ifdef ANSI
-PUBLIC int main
+int main
 (
 int argc,                       /* argument count */
 char **argv                     /* argument vector */
 )
 #else
-PUBLIC int main(argc, argv)
+int main(argc, argv)
 int argc;                       /* argument count */
 char **argv;                    /* argument vector */
 #endif
 {
-   TRC0(main);
 
 #ifdef XEON_MULTIPLE_CELL_CHANGES
    /* Read the WLS parameters from the file and copy into global control block */
@@ -873,18 +864,17 @@ char **argv;                    /* argument vector */
 *
 */
 #ifdef ANSI
-PUBLIC int ssMain
+int ssMain
 (
 int argc,                       /* argument count */
 char **argv                     /* argument vector */
 )
 #else
-PUBLIC int ssMain(argc, argv)
+int ssMain(argc, argv)
 int argc;                       /* argument count */
 char **argv;                    /* argument vector */
 #endif
 {
-   TRC0(ssMain);
 
 
    msArgc = argc;
@@ -916,12 +906,12 @@ char **argv;                    /* argument vector */
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdInitGen
+S16 ssdInitGen
 (
 void
 )
 #else
-PUBLIC S16 ssdInitGen()
+S16 ssdInitGen()
 #endif
 {
    struct sigaction act;
@@ -930,7 +920,6 @@ PUBLIC S16 ssdInitGen()
    struct sigaction sa;
 #endif
 
-   TRC0(ssdInitGen);
 
   /*mt014.301 : 4GMX release related changes*/
 #ifdef SS_4GMX_UCORE
@@ -1076,21 +1065,20 @@ PUBLIC S16 ssdInitGen()
 *
 */
 #ifdef ANSI
-PUBLIC Void ssdDeinitGen
+Void ssdDeinitGen
 (
 void
 )
 #else
-PUBLIC Void ssdDeinitGen()
+Void ssdDeinitGen()
 #endif
 {
-   TRC0(ssdDeinitGen);
 
 
    sem_destroy(&osCp.dep.ssStarted);
 
 
-   RETVOID;
+   return;
 }
 #ifdef SS_LOCKLESS_MEMORY
 #ifdef USE_MALLOC
@@ -1110,15 +1098,15 @@ PUBLIC Void ssdDeinitGen()
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssPutDynMemBlkSet
+S16 ssPutDynMemBlkSet
 (
-U8                    bktIdx,        /* Index to bucket list */
+uint8_t                    bktIdx,        /* Index to bucket list */
 CmMmBlkSetElement    *dynMemSetElem  /* Memory set element which is needs to be 
                                         added to global region */
 )
 #else
-PUBLIC S16 ssPutDynMemBlkSet(bktIdx, dynMemSetElem)
-U8                    bktIdx;        /* Index to bucket list */
+S16 ssPutDynMemBlkSet(bktIdx, dynMemSetElem)
+uint8_t                    bktIdx;        /* Index to bucket list */
 CmMmBlkSetElement    *dynMemSetElem; /* Memory set element which is needs to be 
                                         added to global region */
 #endif
@@ -1126,7 +1114,7 @@ CmMmBlkSetElement    *dynMemSetElem; /* Memory set element which is needs to be
    CmMmGlobRegCb        *globReg;
    CmMmGlobalBktCb      *bktCb;
    Data                 *blkPtr;
-   U8                    blkCnt;
+   uint8_t                    blkCnt;
 
    globReg = osCp.globRegCb;
 
@@ -1168,15 +1156,15 @@ CmMmBlkSetElement    *dynMemSetElem; /* Memory set element which is needs to be
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssGetDynMemBlkSet
+S16 ssGetDynMemBlkSet
 (
-U8                     bktIdx,        /* Index to bucket list */
+uint8_t               bktIdx,        /* Index to bucket list */
 CmMmBlkSetElement     *dynMemSetElem  /* Memory set element which is updated 
                                       with new set values */
 )
 #else
-PUBLIC S16 ssGetDynMemBlkSet(bktIdx, dynMemSetElem)
-U8                     bktIdx;        /* Index to bucket list */
+S16 ssGetDynMemBlkSet(bktIdx, dynMemSetElem)
+uint8_t               bktIdx;        /* Index to bucket list */
 CmMmBlkSetElement     *dynMemSetElem; /* Memory set element which is updated 
                                       with new set values */
 #endif
@@ -1186,7 +1174,7 @@ CmMmBlkSetElement     *dynMemSetElem; /* Memory set element which is updated
    CmMmGlobalBktCb      *bktCb;
    Data                **basePtr;
    Data                 *blkPtr;
-   U8                    blkCnt;
+   uint8_t                    blkCnt;
 
    globReg = osCp.globRegCb;
 
@@ -1230,19 +1218,19 @@ CmMmBlkSetElement     *dynMemSetElem; /* Memory set element which is updated
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssPutDynMemBlkSet
+S16 ssPutDynMemBlkSet
 (
-U8                    bktIdx,               /* Index to bucket list */
+uint8_t                    bktIdx,               /* Index to bucket list */
 CmMmBlkSetElement    *dynMemSetElem,        /* Memory set element which is needs to be 
                                                added to global region */
-U32                    doNotBlockForLock    /* Boolean whether to block for lock or not */
+uint32_t                    doNotBlockForLock    /* Boolean whether to block for lock or not */
 )
 #else
-PUBLIC S16 ssPutDynMemBlkSet(bktIdx, dynMemSetElem)
-U8                    bktIdx;               /* Index to bucket list */
+S16 ssPutDynMemBlkSet(bktIdx, dynMemSetElem)
+uint8_t                    bktIdx;               /* Index to bucket list */
 CmMmBlkSetElement    *dynMemSetElem;        /* Memory set element which is needs to be 
                                                added to global region */
-U32                    doNotBlockForLock;   /* Boolean whether to block for lock or not */
+uint32_t                    doNotBlockForLock;   /* Boolean whether to block for lock or not */
 #endif
 {
    CmMmGlobRegCb       *globReg;
@@ -1251,7 +1239,6 @@ U32                    doNotBlockForLock;   /* Boolean whether to block for lock
    CmMmBlkSetElement   *globMemNode;
    S16                  lockRet = 0;
 
-   TRC1(ssPutDynMemBlkSet);
 
    globReg = osCp.globRegCb;
 
@@ -1318,19 +1305,19 @@ U32                    doNotBlockForLock;   /* Boolean whether to block for lock
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssGetDynMemBlkSet
+S16 ssGetDynMemBlkSet
 (
-U8                     bktIdx,              /* Index to bucket list */
+uint8_t                     bktIdx,              /* Index to bucket list */
 CmMmBlkSetElement     *dynMemSetElem,       /* Memory set element which is updated 
                                                with new set values */
-U32                    doNotBlockForLock    /* Boolean whether to block for lock or not */
+uint32_t                    doNotBlockForLock    /* Boolean whether to block for lock or not */
 )
 #else
-PUBLIC S16 ssGetDynMemBlkSet(bktIdx, dynMemSetElem)
-U8                     bktIdx;              /* Index to bucket list */
+S16 ssGetDynMemBlkSet(bktIdx, dynMemSetElem)
+uint8_t                     bktIdx;              /* Index to bucket list */
 CmMmBlkSetElement     *dynMemSetElem;       /* Memory set element which is updated 
                                                with new set values */
-U32                    doNotBlockForLock;   /* Boolean whether to block for lock or not */
+uint32_t                    doNotBlockForLock;   /* Boolean whether to block for lock or not */
 #endif
 {
    CmMmGlobRegCb        *globReg;
@@ -1339,7 +1326,6 @@ U32                    doNotBlockForLock;   /* Boolean whether to block for lock
    CmMmBlkSetElement    *globMemNode;
    S16                   lockRet = 0;
 
-   TRC1(ssGetDynMemBlkSet);
 
    globReg = osCp.globRegCb;
 
@@ -1388,22 +1374,21 @@ U32                    doNotBlockForLock;   /* Boolean whether to block for lock
 
 
 #define NUM_CALLS_TO_CHECK_MEM_DYN_AGAIN 100
-U32 gDynMemAlrm[4];
-PRIVATE U32 memoryCheckCounter;
+uint32_t gDynMemAlrm[4];
+static uint32_t memoryCheckCounter;
 
 #ifdef ANSI
-PUBLIC U32 isMemThreshReached(
+uint32_t isMemThreshReached(
 Region reg
 )
 #else
-PUBLIC U32 isMemThreshReached(reg)
+uint32_t isMemThreshReached(reg)
 Region reg;
 #endif
 {
    CmMmGlobRegCb        *globReg;
    CmMmGlobalBktCb      *bktCb;
-   U8 bktIdx= reg;
- TRC3(isMemThreshReached)
+   uint8_t bktIdx= reg;
 
    globReg = osCp.globRegCb;
 
@@ -1464,12 +1449,12 @@ Region reg;
 *
 */
 #ifdef ANSI
-PUBLIC Void * ssGetIccHdl  
+Void * ssGetIccHdl  
 (
 Region region
 )
 #else
-PUBLIC Void * ssGetIccHdl()
+Void * ssGetIccHdl()
 Region region;
 #endif
 {
@@ -1488,25 +1473,25 @@ Region region;
 #endif /* SS_USE_ICC_MEMORY */
 
 #ifdef T2K_MEM_LEAK_DBG
-extern RegionMemLeakInfo regMemLeakInfo;
+RegionMemLeakInfo regMemLeakInfo;
 #endif /* T2K_MEM_LEAK_DBG */
 
 #ifdef INTEL_WLS
 
-PUBLIC S16 SPartitionWlsMemory()
+S16 SPartitionWlsMemory()
 {
-   U32    i;
+   uint32_t    i;
 #ifndef ALIGN_64BIT
-   U64    reqdSz;
-   U64   pageSize[1], hugePageSize;
+   uint64_t    reqdSz;
+   uint64_t   pageSize[1], hugePageSize;
 #else
    long int reqdSz;
    long int pageSize[1], hugePageSize;
 #endif
-   U32 numHugePg;
+   uint32_t numHugePg;
    #define DIV_ROUND_OFFSET(X,Y) ( X/Y + ((X%Y)?1:0) )
 
-   U8   *regMemStrtAddr = (U8 *)osCp.wls.allocAddr;
+   uint8_t   *regMemStrtAddr = (uint8_t *)osCp.wls.allocAddr;
 
    gethugepagesizes(pageSize,1);
    hugePageSize = pageSize[0];
@@ -1520,7 +1505,7 @@ PUBLIC S16 SPartitionWlsMemory()
       regMemStrtAddr += reqdSz;
 #ifdef T2K_MEM_LEAK_DBG
       /* Since wls is region 0 */
-      regMemLeakInfo.regStartAddr[i] = (U64)mtRegMemSz[i].startAddr;
+      regMemLeakInfo.regStartAddr[i] = (uint64_t)mtRegMemSz[i].startAddr;
       regMemLeakInfo.numActvRegions++;
 #endif /* T2K_MEM_LEAK_DBG */
    }
@@ -1530,7 +1515,7 @@ PUBLIC S16 SPartitionWlsMemory()
 }
 
 #ifdef SS_MEM_WL_DEBUG
-PUBLIC Void SChkAddrValid(int type, int region, PTR ptr)
+Void SChkAddrValid(int type, int region, PTR ptr)
 {
    char *tryPtr = NULL;
    if(type == 0) //Global
@@ -1554,12 +1539,12 @@ PUBLIC Void SChkAddrValid(int type, int region, PTR ptr)
 }
 #endif /* SS_MEM_WL_DEBUG */
 
-PUBLIC S16 SPartitionStaticMemory(U8  *startAddr)
+S16 SPartitionStaticMemory(uint8_t  *startAddr)
 {
    int    i;
-   U32    reqdSz;
+   uint32_t    reqdSz;
 
-   U8   *regMemStrtAddr = (U8 *)startAddr;
+   uint8_t   *regMemStrtAddr = (uint8_t *)startAddr;
 
 
    //for (i = 0; i < mtMemoCfg.numRegions; i++)
@@ -1570,18 +1555,18 @@ PUBLIC S16 SPartitionStaticMemory(U8  *startAddr)
       regMemStrtAddr += reqdSz;
 #ifdef T2K_MEM_LEAK_DBG
       {  /* Since region 1 onwards are used for non wls */
-         regMemLeakInfo.regStartAddr[i] = (U64)mtRegMemSz[i].startAddr;
+         regMemLeakInfo.regStartAddr[i] = (uint64_t)mtRegMemSz[i].startAddr;
          regMemLeakInfo.numActvRegions++;
       }
 #endif /* T2K_MEM_LEAK_DBG */
    }
    return ROK;
 }
-PUBLIC S16 SAllocateWlsMem()
+S16 SAllocateWlsMem()
 {
 
-   U32            reqdMemSz;
-   U32            i, j;
+   uint32_t            reqdMemSz;
+   uint32_t            i, j;
    MtRegCfg       *region;
 
    reqdMemSz = 0;
@@ -1611,13 +1596,13 @@ PUBLIC S16 SAllocateWlsMem()
    SPartitionWlsMemory();
    return ROK;
 }
-PUBLIC S16 SAllocateStaticMem()
+S16 SAllocateStaticMem()
 {
 
-   U32            reqdMemSz;
+   uint32_t            reqdMemSz;
    int            i, j;
    MtRegCfg       *region;
-   U8             *startAddr;
+   uint8_t             *startAddr;
 
    reqdMemSz = 0;
    //memset(&mtRegMemSz[0], sizeof(mtRegMemSz), 0);
@@ -1666,18 +1651,18 @@ PUBLIC S16 SAllocateStaticMem()
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdInitMem
+S16 ssdInitMem
 (
 void
 )
 #else
-PUBLIC S16 ssdInitMem()
+S16 ssdInitMem()
 #endif
 {
    /* mt018.201 - added local variable */
-   U8              i;
-   U16             j;
-   U8              k;
+   uint8_t              i;
+   uint16_t             j;
+   uint8_t              k;
    MtRegCfg       *region;
    Txt             errMsg[256] = {'\0'};
 #ifdef SS_LOCKLESS_MEMORY
@@ -1689,7 +1674,6 @@ PUBLIC S16 ssdInitMem()
 #endif
 #endif /* SS_LOCKLESS_MEMORY */
    
-   TRC0(ssdInitMem);
 
    /* Use the default SSI memory manager if the ICC memory manager is not 
     * avilable. If ICC memory manager is avilable, it will be used for
@@ -1786,7 +1770,7 @@ PUBLIC S16 ssdInitMem()
 #endif /* SS_LOCKLESS_MEMORY */
 
 #ifdef T2K_MEM_LEAK_DBG
-    U8 reg; 
+    uint8_t reg; 
     /* Initailize mem leak tool memorys for debguing */
     regMemLeakInfo.numActvRegions=0;
     for(reg=0; reg <SS_MAX_REGS; reg++)
@@ -1974,18 +1958,17 @@ PUBLIC S16 ssdInitMem()
 *
 */
 #ifdef ANSI
-PUBLIC Void ssdDeinitMem
+Void ssdDeinitMem
 (
 void
 )
 #else
-PUBLIC Void ssdDeinitMem()
+Void ssdDeinitMem()
 #endif
 {
    /* mt018.201 - added local variables */
-   U8     i;
+   uint8_t     i;
 
-   TRC0(ssdDeinitMem);
        /* mt008.301 Additions */
 #ifdef SS_MEM_LEAK_STS
        cmDeinitMemLeakMdl();
@@ -1999,7 +1982,7 @@ PUBLIC Void ssdDeinitMem()
       free(mtCMMRegCfg[i]);
    }
 
-   RETVOID;
+   return;
 }
 
 \f
@@ -2018,21 +2001,20 @@ PUBLIC Void ssdDeinitMem()
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdInitTsk
+S16 ssdInitTsk
 (
 void
 )
 #else
-PUBLIC S16 ssdInitTsk()
+S16 ssdInitTsk()
 #endif
 {
 /* mt001.301 : Additions */
 /*mt013.301 :Added SS_AFFINITY_SUPPORT  */
 #if defined(SS_MULTICORE_SUPPORT) ||defined(SS_AFFINITY_SUPPORT)
-   U32 tskInd = 0;
+   uint32_t tskInd = 0;
 #endif /* SS_MULTICORE_SUPPORT || SS_AFFINITY_SUPPORT */
 
-   TRC0(ssdInitTsk);
 
 
 /*mt013.301 :Added SS_AFFINITY_SUPPORT  */
@@ -2062,17 +2044,16 @@ PUBLIC S16 ssdInitTsk()
 *
 */
 #ifdef ANSI
-PUBLIC Void ssdDeinitTsk
+Void ssdDeinitTsk
 (
 void
 )
 #else
-PUBLIC Void ssdDeinitTsk()
+Void ssdDeinitTsk()
 #endif
 {
-   TRC0(ssdDeinitTsk);
 
-   RETVOID;
+   return;
 }
 
 \f
@@ -2092,12 +2073,12 @@ PUBLIC Void ssdDeinitTsk()
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdInitDrvr
+S16 ssdInitDrvr
 (
 void
 )
 #else
-PUBLIC S16 ssdInitDrvr()
+S16 ssdInitDrvr()
 #endif
 {
    S16 i;
@@ -2105,7 +2086,6 @@ PUBLIC S16 ssdInitDrvr()
    pthread_attr_t attr;
 #endif
 
-   TRC0(ssdInitDrvr);
 
 
    /* initialize the dependent portion of the driver task entries */
@@ -2171,15 +2151,14 @@ PUBLIC S16 ssdInitDrvr()
 *
 */
 #ifdef ANSI
-PUBLIC Void ssdDeinitDrvr
+Void ssdDeinitDrvr
 (
 void
 )
 #else
-PUBLIC Void ssdDeinitDrvr()
+Void ssdDeinitDrvr()
 #endif
 {
-   TRC0(ssdDeinitDrvr);
   /* mt008.301: Terminate the Driver Task on exit */
   while(pthread_cancel(osCp.dep.isTskHdlrTID));
 
@@ -2191,7 +2170,7 @@ PUBLIC Void ssdDeinitDrvr()
   }
 #endif
 
-   RETVOID;
+   return;
 }
 #endif /* SS_DRVR_SUPPORT */
 
@@ -2211,12 +2190,12 @@ PUBLIC Void ssdDeinitDrvr()
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdInitTmr
+S16 ssdInitTmr
 (
 void
 )
 #else
-PUBLIC S16 ssdInitTmr()
+S16 ssdInitTmr()
 #endif
 {
    pthread_attr_t attr;
@@ -2227,10 +2206,9 @@ PUBLIC S16 ssdInitTmr()
    SsSTskEntry     *sTsk;
 #endif /* SS_MULTICORE_SUPPORT */
 #ifdef SS_THR_REG_MAP
-   U32 threadCreated = FALSE;
+   uint32_t threadCreated = FALSE;
 #endif /* SS_THR_REG_MAP */
 
-   TRC0(ssdInitTmr);
 
 
    osCp.dep.tmrTqCp.tmrLen = SS_MAX_TMRS;
@@ -2309,12 +2287,12 @@ PUBLIC S16 ssdInitTmr()
 *
 */
 #ifdef ANSI
-PUBLIC Void ssdDeinitTmr
+Void ssdDeinitTmr
 (
 void
 )
 #else
-PUBLIC Void ssdDeinitTmr()
+Void ssdDeinitTmr()
 #endif
 {
 #ifdef SS_MULTICORE_SUPPORT
@@ -2322,7 +2300,6 @@ PUBLIC Void ssdDeinitTmr()
    S16         ret;
 #endif /* SS_MULTICORE_SUPPORT */
 
-   TRC0(ssdDeinitTmr);
 
 #ifdef SS_MULTICORE_SUPPORT
    ret = SLock(&osCp.sTskTblLock);
@@ -2333,7 +2310,7 @@ PUBLIC Void ssdDeinitTmr()
       MTLOGERROR(ERRCLS_DEBUG, EMT008, (ErrVal) ret,
                  "Could not lock system task table");
 #endif
-      RETVOID;
+      return;
    }
    sTsk = &osCp.sTskTbl[0]; /* first entry is timer entry always */
    /* clean up the system task entry */
@@ -2356,7 +2333,7 @@ PUBLIC Void ssdDeinitTmr()
 #endif /* SS_MULTICORE_SUPPORT */
   /* mt008.301: Terminate the timer thread on exit */
   while(pthread_cancel(osCp.dep.tmrHdlrTID));
-  RETVOID;
+  return;
 }
 
 
@@ -2375,12 +2352,12 @@ PUBLIC Void ssdDeinitTmr()
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdInitLog
+S16 ssdInitLog
 (
 void
 )
 #else
-PUBLIC S16 ssdInitLog()
+S16 ssdInitLog()
 #endif
 {
 /* mt027.201 - Modification to fix warnings with no STDIN and STDOUT */
@@ -2396,7 +2373,6 @@ PUBLIC S16 ssdInitLog()
 #endif /* CONAVL */
 
 /* mt008.301: ssdInitFinal changed to ssdInitLog */
-   TRC0(ssdInitLog);
 
 
 #ifdef CONAVL
@@ -2482,16 +2458,15 @@ PUBLIC S16 ssdInitLog()
 */
 /* mt008.301: ssdDeinitFinal changed to ssdDeinitLog */
 #ifdef ANSI
-PUBLIC Void ssdDeinitLog
+Void ssdDeinitLog
 (
 void
 )
 #else
-PUBLIC Void ssdDeinitLog()
+Void ssdDeinitLog()
 #endif
 {
 /* mt008.301: ssdDeinitFinal changed to ssdDeinitLog */
-   TRC0(ssdDeinitLog);
 #ifdef CONAVL
 #ifndef CONRD
   /* mt008.301: Terminate the console reader on exit */
@@ -2499,23 +2474,23 @@ PUBLIC Void ssdDeinitLog()
 #endif /* CONRD */
 #endif /* CONVAL */
 
-   RETVOID;
+   return;
 }
 /* mt001.301 : Additions */
 #ifdef SS_WATCHDOG
 
 
 #ifdef ANSI
-PUBLIC S16 ssdInitWatchDog
+S16 ssdInitWatchDog
 (
-U16 port
+uint16_t port
 )
 #else
-PUBLIC S16 ssdInitWatchDog(port)
-U16 port;
+S16 ssdInitWatchDog(port)
+uint16_t port;
 #endif
 {
-   U8 idx;
+   uint8_t idx;
    Txt prntBuf[PRNTSZE];
    Pst     pst;
    Buffer *mBuf;
@@ -2532,7 +2507,6 @@ U16 port;
    }
 #endif /* SS_MULTIPLE_PROCS */
 
-   TRC0(ssdInitWatchDog);
 
    SInitLock(&osCp.wdCp.wdLock, SS_LOCK_MUTEX);
 
@@ -2571,7 +2545,7 @@ U16 port;
    ssdInitWatchDgPst(&(osCp.wdCp.watchDgPst));
    /* Initialize the watch dog timer resolution default is 1 sec */
 
-   cmInitTimers(osCp.wdCp.watchDgTmr, (U8)1);
+   cmInitTimers(osCp.wdCp.watchDgTmr, (uint8_t)1);
    osCp.wdCp.watchDgTqCp.nxtEnt = 0;
    osCp.wdCp.watchDgTqCp.tmrLen = 1;
    for(idx = 0; idx < 1; idx++)
@@ -2630,16 +2604,15 @@ U16 port;
 }
 
 #ifdef ANSI
-PUBLIC S16 ssdInitWatchDgPst
+S16 ssdInitWatchDgPst
 (
 Pst *pst
 )
 #else
-PUBLIC S16 ssdInitWatchDgPst(pst)
+S16 ssdInitWatchDgPst(pst)
 Pst *pst;
 #endif
 {
-   TRC1(ssInitWatchDgPst);
 
    pst->selector  = SS_LOOSE_COUPLING;
 
@@ -2659,27 +2632,26 @@ Pst *pst;
 
 #ifdef SS_MULTIPLE_PROCS
 #ifdef ANSI
-PUBLIC S16 ssdWatchDgActvTmr
+S16 ssdWatchDgActvTmr
 (
 ProcId proc,
 Ent ent,
 Inst inst
 )
 #else
-PUBLIC S16 ssdWatchDgActvTmr(proc, ent, inst)
+S16 ssdWatchDgActvTmr(proc, ent, inst)
 #endif
 #else
 #ifdef ANSI
-PUBLIC S16 ssdWatchDgActvTmr
+S16 ssdWatchDgActvTmr
 (
 Void
 )
 #else
-PUBLIC S16 ssdWatchDgActvTmr()
+S16 ssdWatchDgActvTmr()
 #endif
 #endif /* SS_MULTIPLE_PROCS */
 {
-   TRC3(ssWatchDgActvTmr);
 
    cmPrcTmr(&osCp.wdCp.watchDgTqCp, osCp.wdCp.watchDgTs, (PFV)ssdWatchDgTmrEvt);
 
@@ -2687,13 +2659,13 @@ PUBLIC S16 ssdWatchDgActvTmr()
 }
 
 #ifdef ANSI
-PUBLIC Void ssdWatchDgTmrEvt
+Void ssdWatchDgTmrEvt
 (
 PTR       cb,        /* control block */
 S16       event      /* timer number */
 )
 #else
-PUBLIC Void ssdWatchDgTmrEvt(cb, event)
+Void ssdWatchDgTmrEvt(cb, event)
 PTR       cb;        /* control block */
 S16       event;     /* timer number */
 #endif
@@ -2706,7 +2678,6 @@ S16       event;     /* timer number */
    Bool restartTmr;
    int i;
 
-   TRC2(ssWatchDgTmrEvt);
 
    switch(event)
    {
@@ -2748,17 +2719,17 @@ S16       event;     /* timer number */
 }
 
 #ifdef ANSI
-PUBLIC Void ssdStartWatchDgTmr
+Void ssdStartWatchDgTmr
 (
 void             *cb,
 S16              event,
-U16              wait
+uint16_t              wait
 )
 #else
-PUBLIC Void ssdStartWatchDgTmr(cb, event, wait)
+Void ssdStartWatchDgTmr(cb, event, wait)
 void             *cb;
 S16              event;
-U16              wait;
+uint16_t              wait;
 #endif
 {
    CmTmrArg    arg;
@@ -2769,7 +2740,6 @@ U16              wait;
 #endif
 
 
-   TRC2(ssStartWatchDgTmr)
        /* mt003.301 Modifications */
 #ifdef DEBUGP
    SGetDateTime(&dt);
@@ -2800,17 +2770,17 @@ U16              wait;
    arg.max    = 1;
    cmPlcCbTq(&arg);
 
-   RETVOID;
+   return;
 }
 
 #ifdef ANSI
-PUBLIC Void ssdStopWatchDgTmr
+Void ssdStopWatchDgTmr
 (
 void             *cb,
 S16              event
 )
 #else
-PUBLIC Void ssdStopWatchDgTmr(cb, event)
+Void ssdStopWatchDgTmr(cb, event)
 void             *cb;
 S16              event;
 #endif
@@ -2822,7 +2792,6 @@ S16              event;
    int i;
 #endif
 
-   TRC2(ssStopWatchDgTmr)
        /* mt003.301 Modifications */
 #ifdef DEBUGP
    SGetDateTime(&dt);
@@ -2851,19 +2820,19 @@ S16              event;
    arg.max    = 1;
    cmRmvCbTq(&arg);
 
-   RETVOID;
+   return;
 }
 
 #ifdef ANSI
-PUBLIC S16 ssdSndHrtBtMsg
+S16 ssdSndHrtBtMsg
 (
 Bool             restart,
-U32              type
+uint32_t              type
 )
 #else
-PUBLIC S16 ssdSndHrtBtMsg(restart, type)
+S16 ssdSndHrtBtMsg(restart, type)
 Bool             restart;
-U32              type;
+uint32_t              type;
 #endif
 {
    S16     ret = ROK;
@@ -2876,7 +2845,6 @@ U32              type;
    int             n;
    int             err;
 
-   TRC2(ssdSndHrtBtReq)
 
 #ifdef DEBUGP
    SGetDateTime(&dt);
@@ -2950,12 +2918,12 @@ U32              type;
 *
 */
 #ifdef ANSI
-PRIVATE Void mtGetOpts
+static Void mtGetOpts
 (
 void
 )
 #else
-PRIVATE Void mtGetOpts()
+static Void mtGetOpts()
 #endif
 {
    S32 argc;
@@ -2965,7 +2933,7 @@ PRIVATE Void mtGetOpts()
 #ifndef NOFILESYS
    FILE         *memOpt;             /* memory options file pointer */
    Txt pBuf[128];
-   U8 i;
+   uint8_t i;
 /* mt007.301 : Fix related to file based mem config on 64 bit machine */
    PTR numReg;
    PTR numBkts;
@@ -2990,7 +2958,6 @@ PRIVATE Void mtGetOpts()
    Cntr   idx=0;
 #endif
 
-   TRC0(mtGetOpts);
 
 
    msOptInd = 1;
@@ -3293,7 +3260,7 @@ PRIVATE Void mtGetOpts()
    msOptInd = 1;
 
 
-   RETVOID;
+   return;
 }
 #endif
 
@@ -3335,14 +3302,14 @@ PRIVATE Void mtGetOpts()
 *
 */
 #ifdef ANSI
-PUBLIC S16 SGetOpt
+S16 SGetOpt
 (
 int argc,                   /* argument count */
 char **argv,                /* argument value */
 char *opts                  /* options */
 )
 #else
-PUBLIC S16 SGetOpt(argc, argv, opts)
+S16 SGetOpt(argc, argv, opts)
 int argc;                   /* argument count */
 char **argv;                /* argument value */
 char *opts;                 /* options */
@@ -3355,7 +3322,6 @@ char *opts;                 /* options */
    S8 *cp;
 #endif
 
-   TRC1(SGetOpt);
 
    /* mt020.201 - Addition for no command line */
 #ifdef NOCMDLINE
@@ -3450,18 +3416,17 @@ char *opts;                 /* options */
 *
 */
 #ifdef ANSI
-PUBLIC Void ssdStart
+Void ssdStart
 (
 void
 )
 #else
-PUBLIC Void ssdStart()
+Void ssdStart()
 #endif
 {
    S16 i;
 
 
-   TRC0(ssdStart);
 
 
    /* mt025.201 - Modification for adding lock to timer handler */
@@ -3471,7 +3436,7 @@ PUBLIC Void ssdStart()
    }
 
 
-   RETVOID;
+   return;
 }
 
 \f
@@ -3495,12 +3460,12 @@ PUBLIC Void ssdStart()
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdAttachTTsk
+S16 ssdAttachTTsk
 (
 SsTTskEntry *tTsk           /* pointer to TAPA task entry */
 )
 #else
-PUBLIC S16 ssdAttachTTsk(tTsk)
+S16 ssdAttachTTsk(tTsk)
 SsTTskEntry *tTsk;          /* pointer to TAPA task entry */
 #endif
 {
@@ -3508,10 +3473,6 @@ SsTTskEntry *tTsk;          /* pointer to TAPA task entry */
    SsMsgInfo *mInfo;
    S16 ret;
 
-
-   TRC0(ssdAttachTTsk);
-
-
    if (tTsk->tskType == SS_TSK_PERMANENT)
    {
       /* Send a permanent tick message to this task, to start
@@ -3583,17 +3544,15 @@ SsTTskEntry *tTsk;          /* pointer to TAPA task entry */
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdDetachTTsk
+S16 ssdDetachTTsk
 (
 SsTTskEntry *tTsk           /* pointer to TAPA task entry */
 )
 #else
-PUBLIC S16 ssdDetachTTsk(tTsk)
+S16 ssdDetachTTsk(tTsk)
 SsTTskEntry *tTsk;          /* pointer to TAPA task entry */
 #endif
 {
-   TRC0(ssdDetachTTsk);
-
 
    return ROK;
 }
@@ -3614,23 +3573,23 @@ SsTTskEntry *tTsk;          /* pointer to TAPA task entry */
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdCreateSTsk
+S16 ssdCreateSTsk
 (
 SsSTskEntry *sTsk           /* pointer to system task entry */
 )
 #else
-PUBLIC S16 ssdCreateSTsk(sTsk)
+S16 ssdCreateSTsk(sTsk)
 SsSTskEntry *sTsk;          /* pointer to system task entry */
 #endif
 {
+   S16  ret;
    pthread_attr_t attr;
    /* struct sched_param param_sched;*/
 
 #ifdef SS_THR_REG_MAP
-   U32 threadCreated = FALSE;
+   uint32_t threadCreated = FALSE;
 #endif
 
-   TRC0(ssdCreateSTsk);
 
 
 #ifdef SS_SINGLE_THREADED
@@ -3680,9 +3639,10 @@ SsSTskEntry *sTsk;          /* pointer to system task entry */
       while(threadCreated == FALSE)
       {
 #endif
-         if ((pthread_create(&sTsk->dep.tId, &attr, mtTskHdlrT2kL2, (Ptr)sTsk)) != 0)
+         ret = pthread_create(&sTsk->dep.tId, &attr, mtTskHdlr, (Ptr)sTsk);
+         if (ret != 0)
          {
-
+            DU_LOG("\nDU APP : Failed to create thread. Cause[%d]",ret);
             pthread_attr_destroy(&attr);
 
 #if (ERRCLASS & ERRCLS_DEBUG)
@@ -3710,7 +3670,8 @@ SsSTskEntry *sTsk;          /* pointer to system task entry */
       while(threadCreated == FALSE)
       {
 #endif
-         if ((pthread_create(&sTsk->dep.tId, &attr, mtTskHdlr, (Ptr)sTsk)) != 0)
+         ret = pthread_create(&sTsk->dep.tId, &attr, mtTskHdlr, (Ptr)sTsk);
+         if (ret != 0)
          {
 
             /* mt020.201 - Addition for destroying thread attribute object attr */
@@ -3733,7 +3694,7 @@ SsSTskEntry *sTsk;          /* pointer to system task entry */
 /*mt013.301 :Added SS_AFFINITY_SUPPORT  */
 #if defined(SS_MULTICORE_SUPPORT) ||defined(SS_AFFINITY_SUPPORT)
    {
-     static U32 stLwpId = 3;
+     static uint32_t stLwpId = 3;
      sTsk->dep.lwpId = ++stLwpId;
    }
 #endif /* SS_MULTICORE_SUPPORT || SS_AFFINITY_SUPPORT */
@@ -3746,7 +3707,7 @@ SsSTskEntry *sTsk;          /* pointer to system task entry */
 
 
 #ifdef ANSI
-PUBLIC int SCreatePThread
+int SCreatePThread
 (
 pthread_t* tid,
 pthread_attr_t* attr,
@@ -3754,7 +3715,7 @@ void *(*start_routine) (void *),
 void* arg
 )
 #else
-PUBLIC int SCreatePThread(tid, attr, start_routine, arg)
+int SCreatePThread(tid, attr, start_routine, arg)
 pthread_t* tid;
 pthread_attr_t* attr;
 void *(*start_routine) (void *);
@@ -3763,7 +3724,7 @@ void* arg;
 {
    int retVal = 0;
 #ifdef SS_THR_REG_MAP
-   U32 threadCreated = FALSE;
+   uint32_t threadCreated = FALSE;
 #endif
 
    SPThreadCreateArg* threadArg = (SPThreadCreateArg*)malloc(sizeof(SPThreadCreateArg));
@@ -3775,7 +3736,6 @@ void* arg;
    threadArg->argument = arg;
    threadArg->start_routine = start_routine;
    
-   TRC0(SCreatePThread);
 
    printf("Creating thread here %s %d\n", __FILE__, __LINE__);
    {
@@ -3821,20 +3781,19 @@ void* arg;
 */
 
 #ifdef ANSI
-PRIVATE S16 ssdSetPthreadAttr
+static S16 ssdSetPthreadAttr
 (
 S32              tskPrior,
 pthread_attr_t  *attr
 )
 #else
-PRIVATE S16 ssdSetPthreadAttr(sTsk, attr)
+static S16 ssdSetPthreadAttr(sTsk, attr)
 S32               tskPrior,
 pthread_attr_t   *attr
 #endif
 {
    struct sched_param    param;
 
-   TRC0 (ssdSetPthreadAttr)
 
    SMemSet(&param, 0, sizeof(param));
 
@@ -3900,32 +3859,31 @@ pthread_attr_t   *attr
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdGetAffinity
+S16 ssdGetAffinity
 (
 SSTskId *tskId,                  /* filled in with system task ID */
-U32 *coreId                      /* the core/processor id to which the affinity is set */
+uint32_t *coreId                      /* the core/processor id to which the affinity is set */
 )
 #else
-PUBLIC S16 ssdGetAffinity(tskId, coreId)
+S16 ssdGetAffinity(tskId, coreId)
 SSTskId *tskId;                 /* filled in with system task ID */
-U32 *coreId;                    /* the core/processor id to which the affinity is set */
+uint32_t *coreId;                    /* the core/processor id to which the affinity is set */
 #endif
 {
 
-   U32 tskInd;
+   uint32_t tskInd;
 
 #ifdef SS_LINUX
 
    pthread_t tId =0;
    cpu_set_t cpuSet;
-   U32 cpuInd = 0;
+   uint32_t cpuInd = 0;
    /*mt013.301 :Fix for TRACE5 feature crash due to missing TRC MACRO*/
 #else
 #ifdef SUNOS
-   U32 lwpId = *tskId;
+   uint32_t lwpId = *tskId;
 #endif /*SUNOS*/
 #endif /*SS_LINUX*/
-   TRC0(ssdGetAffinity);
 #ifdef SS_LINUX
    for (tskInd = 0;  tskInd < SS_MAX_STSKS;  tskInd++)
    {
@@ -4017,19 +3975,19 @@ U32 *coreId;                    /* the core/processor id to which the affinity i
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdSetAffinity
+S16 ssdSetAffinity
 (
 SSTskId *tskId,                  /* filled in with system task ID */
-U32 coreId                       /* the core/processor id to which the affinity has to be set */
+uint32_t coreId                       /* the core/processor id to which the affinity has to be set */
 )
 #else
-PUBLIC S16 ssdSetAffinity(tskId, coreId)
+S16 ssdSetAffinity(tskId, coreId)
 SSTskId *tskId;                 /* filled in with system task ID */
-U32 coreId;                     /* the core/processor id to which the affinity has to be set */
+uint32_t coreId;                     /* the core/processor id to which the affinity has to be set */
 #endif
 {
 
-   U32 tskInd = 0;
+   uint32_t tskInd = 0;
 #ifdef SS_LINUX
 
    pthread_t tId = 0;
@@ -4037,11 +3995,10 @@ U32 coreId;                     /* the core/processor id to which the affinity h
    /*mt013.301 :Fix for TRACE5 feature crash due to missing TRC MACRO*/
 #else
 #ifdef SUNOS
-   U32 lwpId = *tskId;
+   uint32_t lwpId = *tskId;
 #endif /*SUNOS*/
 #endif /*SS_LINUX*/
 
-   TRC0(ssdSetAffinity)
 
 #ifdef SS_LINUX
    for (tskInd = 0;  tskInd < SS_MAX_STSKS;  tskInd++)
@@ -4130,12 +4087,12 @@ U32 coreId;                     /* the core/processor id to which the affinity h
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdDestroySTsk
+S16 ssdDestroySTsk
 (
 SsSTskEntry *sTsk           /* pointer to system task entry */
 )
 #else
-PUBLIC S16 ssdDestroySTsk(sTsk)
+S16 ssdDestroySTsk(sTsk)
 SsSTskEntry *sTsk;          /* pointer to system task entry */
 #endif
 {
@@ -4143,7 +4100,6 @@ SsSTskEntry *sTsk;          /* pointer to system task entry */
    SsMsgInfo *mInfo;
 
 
-   TRC0(ssdDestroySTsk);
 
 
    /* we send a message to this system task to tell it to die */
@@ -4192,16 +4148,15 @@ SsSTskEntry *sTsk;          /* pointer to system task entry */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SThreadYield
+S16 SThreadYield
 (
 void
 )
 #else
-PUBLIC S16 SThreadYield()
+S16 SThreadYield()
 #endif
 {
 
-   TRC0(SThreadYield);
 
 /* mt024.201 - seperated Linux and other UNIX implementations
  */
@@ -4244,19 +4199,18 @@ PUBLIC S16 SThreadYield()
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdRegTmr
+S16 ssdRegTmr
 (
 SsTmrEntry *tmr             /* pointer to timer entry */
 )
 #else
-PUBLIC S16 ssdRegTmr(tmr)
+S16 ssdRegTmr(tmr)
 SsTmrEntry *tmr;            /* pointer to timer entry */
 #endif
 {
    CmTmrArg arg;
 
 
-   TRC0(ssdRegTmr);
 
 
    /* initialize common timers */
@@ -4294,19 +4248,18 @@ SsTmrEntry *tmr;            /* pointer to timer entry */
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdDeregTmr
+S16 ssdDeregTmr
 (
 SsTmrEntry *tmr             /* pointer to timer entry */
 )
 #else
-PUBLIC S16 ssdDeregTmr(tmr)
+S16 ssdDeregTmr(tmr)
 SsTmrEntry *tmr;            /* pointer to timer entry */
 #endif
 {
    CmTmrArg arg;
 
 
-   TRC0(ssdDeregTmr);
 
 
    /* stop the timer */
@@ -4340,13 +4293,13 @@ SsTmrEntry *tmr;            /* pointer to timer entry */
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdError
+S16 ssdError
 (
 Seq seq,                    /* sequence number */
 Reason reason               /* reset reason */
 )
 #else
-PUBLIC S16 ssdError(seq, reason)
+S16 ssdError(seq, reason)
 Seq seq;                    /* sequence number */
 Reason reason;              /* reset reason */
 #endif
@@ -4356,7 +4309,6 @@ Reason reason;              /* reset reason */
    Txt errBuf[256];
 
 
-   TRC0(ssdError);
 
 
    /* get calling task ID */
@@ -4365,7 +4317,7 @@ Reason reason;              /* reset reason */
 
    /* set up the message to display */
    sprintf(errBuf, "\n\nFATAL ERROR - taskid = %x, errno = %d,"
-            "reason = %d\n\n", (U8)tId, seq, reason);
+            "reason = %d\n\n", (uint8_t)tId, seq, reason);
    SPrint(errBuf);
 
 
@@ -4403,7 +4355,7 @@ Reason reason;              /* reset reason */
 *
 */
 #ifdef ANSI
-PUBLIC Void ssdLogError
+Void ssdLogError
 (
 Ent ent,                    /* Calling layer's entity id */
 Inst inst,                  /* Calling layer's instance id */
@@ -4416,7 +4368,7 @@ ErrVal errVal,              /* error value */
 Txt *errDesc                /* description of error */
 )
 #else
-PUBLIC Void ssdLogError(ent, inst, procId, file, line,
+Void ssdLogError(ent, inst, procId, file, line,
                         errCls, errCode, errVal, errDesc)
 Ent ent;                    /* Calling layer's entity id */
 Inst inst;                  /* Calling layer's instance id */
@@ -4437,7 +4389,6 @@ Txt *errDesc;               /* description of error */
    Txt errBuf[512];
 
 
-   TRC0(ssdLogError);
 
 
    /* get calling task ID */
@@ -4517,7 +4468,7 @@ Txt *errDesc;               /* description of error */
 #endif
 
 
-   RETVOID;
+   return;
 }
 
 #ifdef ENB_RELAY
@@ -4537,16 +4488,15 @@ Txt *errDesc;               /* description of error */
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdRegDrvrTsk
+S16 ssdRegDrvrTsk
 (
 SsDrvrTskEntry *drvrTsk         /* driver task entry */
 )
 #else
-PUBLIC S16 ssdRegDrvrTsk(drvrTsk)
+S16 ssdRegDrvrTsk(drvrTsk)
 SsDrvrTskEntry *drvrTsk;        /* driver task entry */
 #endif
 {
-   TRC0(ssdRegDrvrTsk);
 
 
    return ROK;
@@ -4567,16 +4517,15 @@ SsDrvrTskEntry *drvrTsk;        /* driver task entry */
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdDeregDrvrTsk
+S16 ssdDeregDrvrTsk
 (
 SsDrvrTskEntry *drvrTsk         /* driver task entry */
 )
 #else
-PUBLIC S16 ssdDeregDrvrTsk(drvrTsk)
+S16 ssdDeregDrvrTsk(drvrTsk)
 SsDrvrTskEntry *drvrTsk;        /* driver task entry */
 #endif
 {
-   TRC0(ssdDeregDrvrTsk);
 
 
    return ROK;
@@ -4591,27 +4540,27 @@ SsDrvrTskEntry *drvrTsk;        /* driver task entry */
  */
 #ifdef SS_MULTIPLE_PROCS
 #ifdef ANSI
-PUBLIC S16 ssdProcTTskTerm
+S16 ssdProcTTskTerm
 (
 ProcId procIdx,
 SsTTskEntry *tTsk,
 SsIdx idx
 )
 #else
-PUBLIC S16 ssdProcTTskTerm(procIdx, tTsk, idx)
+S16 ssdProcTTskTerm(procIdx, tTsk, idx)
 ProcId procIdx;
 SsTTskEntry *tTsk;
 SsIdx idx;
 #endif
 #else /*SS_MULTIPLE_PROCS*/
 #ifdef ANSI
-PUBLIC S16 ssdProcTTskTerm
+S16 ssdProcTTskTerm
 (
 SsTTskEntry *tTsk,
 SsIdx idx
 )
 #else
-PUBLIC S16 ssdProcTTskTerm(tTsk, idx)
+S16 ssdProcTTskTerm(tTsk, idx)
 SsTTskEntry *tTsk;
 SsIdx idx;
 #endif
@@ -4626,7 +4575,6 @@ SsIdx idx;
    S16 n;
        S16  ret;
 
-   TRC0(ssdProcTTskTerm);
 
 
    ent = tTsk->ent;
@@ -4743,16 +4691,16 @@ SsIdx idx;
 //#ifndef SPLIT_RLC_DL_TASK
 #ifdef TENB_T2K3K_SPECIFIC_CHANGES
 #if defined (L2_L3_SPLIT) && defined(SPLIT_RLC_DL_TASK) 
-EXTERN Void ysMtTskHdlr(Void);
-EXTERN Void ysMtPollPhyMsg(U8 region);
-EXTERN Void ysMtRcvPhyMsg(Void);
+Void ysMtTskHdlr(Void);
+Void ysMtPollPhyMsg(uint8_t region);
+Void ysMtRcvPhyMsg(Void);
 #ifdef ANSI
-PUBLIC Void *mtTskHdlrT2kL2
+Void *mtTskHdlrT2kL2
 (
 Ptr tskPtr                      /* pointer to task entry */
 )
 #else
-PUBLIC Void *mtTskHdlrT2kL2(tskPtr)
+Void *mtTskHdlrT2kL2(tskPtr)
 Ptr tskPtr;                     /* pointer to task entry */
 #endif
 {
@@ -4780,15 +4728,15 @@ Ptr tskPtr;                     /* pointer to task entry */
   return (NULLP);
 }
 #else
-EXTERN Void ysMtTskHdlr(Void);
-EXTERN Void YsPhyRecvMsg();
+Void ysMtTskHdlr(Void);
+Void YsPhyRecvMsg();
 #ifdef ANSI
-PUBLIC Void *mtTskHdlrT2kL2
+Void *mtTskHdlrT2kL2
 (
 Ptr tskPtr                      /* pointer to task entry */
 )
 #else
-PUBLIC Void *mtTskHdlrT2kL2(tskPtr)
+Void *mtTskHdlrT2kL2(tskPtr)
 Ptr tskPtr;                     /* pointer to task entry */
 #endif
 {
@@ -4843,12 +4791,12 @@ Ptr tskPtr;                     /* pointer to task entry */
 #endif
 
 #ifdef ANSI
-PUBLIC void *pthreadCreateHdlr
+void *pthreadCreateHdlr
 (
 void * arg
 )
 #else
-PUBLIC void *pthreadCreateHdlr(pthreadCreateArg)
+void *pthreadCreateHdlr(pthreadCreateArg)
 void *arg;
 #endif
 {
@@ -4882,12 +4830,12 @@ void *arg;
 *
 */
 #ifdef ANSI
-PUBLIC Void *mtTskHdlr
+Void *mtTskHdlr
 (
 Ptr tskPtr                      /* pointer to task entry */
 )
 #else
-PUBLIC Void *mtTskHdlr(tskPtr)
+Void *mtTskHdlr(tskPtr)
 Ptr tskPtr;                     /* pointer to task entry */
 #endif
 {
@@ -4953,12 +4901,12 @@ Ptr tskPtr;                     /* pointer to task entry */
 *
 */
 #ifdef ANSI
-PUBLIC S16 mtTskHdlMsg
+S16 mtTskHdlMsg
 (
 SsSTskEntry *sTsk
 )
 #else
-PUBLIC S16 mtTskHdlMsg(sTsk)
+S16 mtTskHdlMsg(sTsk)
 SsSTskEntry *sTsk
 #endif
 {
@@ -4981,7 +4929,7 @@ SsSTskEntry *sTsk
    PFS16 tmrActvFn = NULLP;
 #else
    PAIFTMRS16 tmrActvFn;
-   U16 procIdIdx;
+   uint16_t procIdIdx;
 #endif /* SS_MULTIPLE_PROCS */
        /* mt003.301 Modifications */
 #ifdef SS_THREAD_PROFILE
@@ -5130,7 +5078,7 @@ SsSTskEntry *sTsk
 
             /* copy the Pst structure into a local duplicate */
             for (i = 0;  i < (S16) sizeof(Pst);  i++)
-               *(((U8 *)(&nPst)) + i) = *(((U8 *)&mInfo->pst) + i);
+               *(((uint8_t *)(&nPst)) + i) = *(((uint8_t *)&mInfo->pst) + i);
 
             /* Give the message to the task activation function. If
              *  its a normal data message, we pass it, if this is a
@@ -5142,7 +5090,7 @@ SsSTskEntry *sTsk
             {
 #ifndef RGL_SPECIFIC_CHANGES
 #ifdef SS_TSKLOG_ENABLE
-              U32 t = MacGetTick();
+              uint32_t t = MacGetTick();
 #endif
 #endif
                                  /* mt003.301 Modifications */
@@ -5158,8 +5106,8 @@ SsSTskEntry *sTsk
 #endif
 #if SS_THREAD_PROFILE
                 SGetEpcTime(&et2);
-                tTsk->curEvtTime = (U32)(et2 - et1);
-                tTsk->totTime += (U64)tTsk->curEvtTime;
+                tTsk->curEvtTime = (uint32_t)(et2 - et1);
+                tTsk->totTime += (uint64_t)tTsk->curEvtTime;
 #endif /* SS_THREAD_PROFILE */
             }
             else
@@ -5359,11 +5307,11 @@ Bool g_usettitmr;
 *       Fun:   mtTmrHdlrPublic
 */
 #ifdef ANSI
-PUBLIC Void mtTmrHdlrPublic
+Void mtTmrHdlrPublic
 (
 )
 #else
-PUBLIC Void mtTmrHdlrPublic()
+Void mtTmrHdlrPublic()
 #endif
 {
    if (SLock(&osCp.tmrTblLock) != ROK)
@@ -5396,13 +5344,13 @@ PUBLIC Void mtTmrHdlrPublic()
 */
 /*mt041.201 Modified SSI tick handling in mtTmrHdlr() */
 #ifdef ANSI
-PRIVATE Void *mtTmrHdlr
+static Void *mtTmrHdlr
 (
 void *parm                        /* unused */
 )
 #else
    /* mt009.21: addition */
-PRIVATE Void *mtTmrHdlr(parm)
+static Void *mtTmrHdlr(parm)
 void *parm;                       /* unused */
 #endif
 {
@@ -5411,14 +5359,14 @@ void *parm;                       /* unused */
  * enabled oroginal code in function mtTmrHdlr */
 
    struct timespec ts;
-   U32 time_int;
-   U32 i, cnt, oldTicks, newTicks;
+   uint32_t time_int;
+   uint32_t i, cnt, oldTicks, newTicks;
    struct timeval tv1,tv2;
    /* mt038.201 added return */
    S16 ret;
    /* mt039.201 changes for nanosleep */
    struct timespec tsN;
-   PRIVATE U32 err_in_usec;
+   static uint32_t err_in_usec;
 
    /*mt013.301 : doesn't need TRC macro ,as this will never return*/
 
@@ -5559,13 +5507,13 @@ void *parm;                       /* unused */
 *
 */
 #ifdef ANSI
-PUBLIC Void mtTimeout
+Void mtTimeout
 (
 PTR tCb,                        /* control block */
 S16 evnt                        /* event */
 )
 #else
-PUBLIC Void mtTimeout(tCb, evnt)
+Void mtTimeout(tCb, evnt)
 PTR tCb;                        /* control block */
 S16 evnt;                       /* event */
 #endif
@@ -5581,15 +5529,14 @@ S16 evnt;                       /* event */
 #endif
 /* mt028.201: modification: multiple procs support related changes */
 #ifdef SS_MULTIPLE_PROCS
-   U16 procIdIdx;
+   uint16_t procIdIdx;
 #endif /* SS_MULTIPLE_PROCS */
 #ifdef RGL_SPECIFIC_CHANGES
 #ifdef MSPD_MLOG_NEW
-   U32 t = GetTIMETICK();
+   uint32_t t = GetTIMETICK();
 #endif
 #endif
 
-   TRC0(mtTimeout);
 
 
    /* get the timer entry */
@@ -5599,7 +5546,7 @@ S16 evnt;                       /* event */
    /* if the timer was deleted, this will be NULL, so drop it */
    if (tEnt == NULL)
    {
-      RETVOID;
+      return;
    }
 
 /* mt008.301 Deletion: tmrTbl Lock is moved to mtTmrHdlr */
@@ -5610,7 +5557,7 @@ S16 evnt;                       /* event */
     */
    if (tEnt->used == FALSE)
    {
-      RETVOID;
+      return;
    }
 
 
@@ -5632,7 +5579,7 @@ S16 evnt;                       /* event */
       MTLOGERROR(ERRCLS_DEBUG, EMT017, ERRZERO, "Could not get message");
 #endif
 
-      RETVOID;
+      return;
    }
 
    mInfo = (SsMsgInfo *)mBuf->b_rptr;
@@ -5673,7 +5620,7 @@ S16 evnt;                       /* event */
       MTLOGERROR(ERRCLS_DEBUG, EMT018, ret, "Could not lock TAPA task table");
 #endif
 
-      RETVOID;
+      return;
    }
 #endif
 
@@ -5692,7 +5639,7 @@ S16 evnt;                       /* event */
       SS_RELEASE_SEMA(&osCp.tTskTblSem);
 #endif
       SPutMsg(mBuf);
-      RETVOID;
+      return;
    }
 
 
@@ -5704,7 +5651,7 @@ S16 evnt;                       /* event */
       SS_RELEASE_SEMA(&osCp.tTskTblSem);
 #endif
       SPutMsg(mBuf);
-      RETVOID;
+      return;
    }
    /* Klock work fix ccpu00148484 */
    /* write the timer message to the queue of the destination task */
@@ -5721,7 +5668,7 @@ S16 evnt;                       /* event */
                         "Could not write to demand queue");
 #endif
 
-      RETVOID;
+      return;
    }
 #ifdef SS_LOCKLESS_MEMORY
    mInfo->pst.region = tTsk->sTsk->region;
@@ -5740,7 +5687,7 @@ S16 evnt;                       /* event */
                         "Could not write to demand queue");
 #endif
 
-      RETVOID;
+      return;
    }
 /* Fix for ccpu00130657 */
 #ifdef TENB_T2K3K_SPECIFIC_CHANGES
@@ -5776,7 +5723,7 @@ S16 evnt;                       /* event */
    MLogTask(131313, RESOURCE_LARM, t, GetTIMETICK());
 #endif
 #endif
-   RETVOID;
+   return;
 }
 
 \f
@@ -5796,13 +5743,13 @@ S16 evnt;                       /* event */
 *
 */
 #ifdef ANSI
-PRIVATE Void *mtConHdlr
+static Void *mtConHdlr
 (
 Ptr parm                        /* unused */
 )
 #else
   /* mt009.21: addition */
-PRIVATE Void *mtConHdlr(parm)
+static Void *mtConHdlr(parm)
 Ptr parm;                       /* unused */
 #endif
 {
@@ -5865,13 +5812,13 @@ Ptr parm;                       /* unused */
 */
 #ifdef ANSI
   /* mt009.21: addition */
-PRIVATE Void *mtIsTskHdlr
+static Void *mtIsTskHdlr
 (
 Ptr tskPtr                      /* pointer to task entry */
 )
 #else
   /* mt009.21: addition */
-PRIVATE Void *mtIsTskHdlr(tskPtr)
+static Void *mtIsTskHdlr(tskPtr)
 Ptr tskPtr;                     /* pointer to task entry */
 #endif
 {
@@ -5880,10 +5827,6 @@ Ptr tskPtr;                     /* pointer to task entry */
 #endif
    MtIsFlag isFlag;
 
-
-   TRC0(mtIsTskHdlr);
-
-
    for (; ;)
    {
       if (read(osCp.dep.isFildes[0], &isFlag, sizeof(isFlag)) != sizeof(isFlag))
@@ -5973,18 +5916,16 @@ Ptr tskPtr;                     /* pointer to task entry */
 *
 */
 #ifdef ANSI
-PUBLIC Void mtIntSigHndlr
+Void mtIntSigHndlr
 (
 int arg
 )
 #else
-PUBLIC Void mtIntSigHndlr(arg)
+Void mtIntSigHndlr(arg)
 int arg;
 #endif
 {
 
-   TRC0(mtIntSigHndlr);
-
    osCp.dep.sigEvnt=TRUE;
 
 #ifdef MSPD
@@ -5993,7 +5934,7 @@ int arg;
 #endif
 #endif
 
-   RETVOID;
+   return;
 }
 
 /*mt010.301 Fix for core when run with -o option and when killed with SIGINT*/
@@ -6011,20 +5952,18 @@ int arg;
 *
 */
 #ifdef ANSI
-PUBLIC Void mtExitClnup
+Void mtExitClnup
 (
 void
 )
 #else
-PUBLIC Void mtExitClnup()
+Void mtExitClnup()
 #endif
 {
    Ticks ticks;
    S8 buf[128];
 
 
-   TRC0(mtExitClnup);
-
    SGetSysTime(&ticks);
 #ifdef ALIGN_64BIT
    sprintf(buf, "\n\nmtss(posix) ends\nticks: %u\n", ticks);
@@ -6075,18 +6014,17 @@ Ticks SGetTtiCount(Void)
 *
 */
 #ifdef ANSI
-PUBLIC S16 SDisplay
+S16 SDisplay
 (
 S16 chan,                   /* channel */
 Txt *buf                    /* buffer */
 )
 #else
-PUBLIC S16 SDisplay(chan, buf)
+S16 SDisplay(chan, buf)
 S16 chan;                   /* channel */
 Txt *buf;                   /* buffer */
 #endif
 {
-   TRC1(SDisplay);
 
 /* mt020.201 - Fixed typo */
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -6146,15 +6084,14 @@ Txt *buf;                   /* buffer */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SFini
+S16 SFini
 (
 void
 )
 #else
-PUBLIC S16 SFini()
+S16 SFini()
 #endif
 {
-   TRC1(SFini);
 
    /* mt030.201 added under compilet time flag SS_LINUX and SLES9_PLUS
       a loop to overcome the child processes being killed upon exiting the
@@ -6191,17 +6128,15 @@ PUBLIC S16 SFini()
 *
 */
 #ifdef ANSI
-PUBLIC S16 SSetDateTime
+S16 SSetDateTime
 (
 REG1 DateTime *dt           /* date and time */
 )
 #else
-PUBLIC S16 SSetDateTime(dt)
+S16 SSetDateTime(dt)
 REG1 DateTime *dt;          /* date and time */
 #endif
 {
-   TRC1(SSetDateTime);
-
 
    UNUSED(dt);
 
@@ -6227,12 +6162,12 @@ REG1 DateTime *dt;          /* date and time */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SGetDateTime
+S16 SGetDateTime
 (
 REG1 DateTime *dt           /* date and time */
 )
 #else
-PUBLIC S16 SGetDateTime(dt)
+S16 SGetDateTime(dt)
 REG1 DateTime *dt;          /* date and time */
 #endif
 {
@@ -6247,8 +6182,6 @@ REG1 DateTime *dt;          /* date and time */
    struct tm tme;
 
 
-   TRC1(SGetDateTime);
-
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (dt == NULLP)
@@ -6271,12 +6204,12 @@ REG1 DateTime *dt;          /* date and time */
 #endif
    localtime_r(&ptime.tv_sec, &tme);
 
-   dt->month = (U8) tme.tm_mon + 1;
-   dt->day = (U8) tme.tm_mday;
-   dt->year = (U8) tme.tm_year;
-   dt->hour = (U8) tme.tm_hour;
-   dt->min = (U8) tme.tm_min;
-   dt->sec = (U8) tme.tm_sec;
+   dt->month = (uint8_t) tme.tm_mon + 1;
+   dt->day = (uint8_t) tme.tm_mday;
+   dt->year = (uint8_t) tme.tm_year;
+   dt->hour = (uint8_t) tme.tm_hour;
+   dt->min = (uint8_t) tme.tm_min;
+   dt->sec = (uint8_t) tme.tm_sec;
    dt->tenths = 0;
 
 #ifdef SS_DATETIME_USEC
@@ -6308,26 +6241,25 @@ REG1 DateTime *dt;          /* date and time */
 */
 /* mt003.301 Modifications */
 #ifdef ANSI
-PUBLIC S16 SGetEpcTime
+S16 SGetEpcTime
 (
 EpcTime *et           /* date and time */
 )
 #else
-PUBLIC S16 SGetEpcTime(et)
+S16 SGetEpcTime(et)
 EpcTime *et;          /* date and time */
 #endif
 {
 /* mt003.301 Modifications */
-PRIVATE U64 now;
-                 U64  to_sec  = 1000000;
-                 U64  to_nsec = 1000;
+static uint64_t now;
+                 uint64_t  to_sec  = 1000000;
+                 uint64_t  to_nsec = 1000;
 #ifndef SS_LINUX
    struct timespec ptime;
 #else
    struct timeval ptime;
 #endif
 
-   TRC1(SEpcTime);
 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -6375,16 +6307,15 @@ PRIVATE U64 now;
 *
 */
 #ifdef ANSI
-PUBLIC S16 SGetSysTime
+S16 SGetSysTime
 (
 Ticks *sysTime              /* system time */
 )
 #else
-PUBLIC S16 SGetSysTime(sysTime)
+S16 SGetSysTime(sysTime)
 Ticks *sysTime;             /* system time */
 #endif
 {
-   TRC1(SGetSysTime);
 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -6423,17 +6354,17 @@ Ticks *sysTime;             /* system time */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SGetRefTime
+S16 SGetRefTime
 (
-U32 refTime,             /* reference time */
-U32 *sec,
-U32 *usec
+uint32_t refTime,             /* reference time */
+uint32_t *sec,
+uint32_t *usec
 )
 #else
-PUBLIC S16 SGetRefTime(refTime, sec, usec)
-U32 refTime;             /* reference time */
-U32 *sec;
-U32 *usec;
+S16 SGetRefTime(refTime, sec, usec)
+uint32_t refTime;             /* reference time */
+uint32_t *sec;
+uint32_t *usec;
 #endif
 {
 
@@ -6443,7 +6374,6 @@ U32 *usec;
    struct timeval ptime;
 #endif
 
-   TRC1(SGetSysTime);
 
 #ifndef SS_LINUX
   clock_gettime(CLOCK_REALTIME, &ptime);
@@ -6458,7 +6388,7 @@ U32 *usec;
       return RFAILED;
    }
    /* mt022.201 - Modification to fix compile warning */
-   if (refTime > (U32)(ptime.tv_sec))
+   if (refTime > (uint32_t)(ptime.tv_sec))
    {
       MTLOGERROR(ERRCLS_INT_PAR, EMT026, ERRZERO, "Reference time exceeds present time");
       return RFAILED;
@@ -6493,16 +6423,15 @@ U32 *usec;
 *
 */
 #ifdef ANSI
-PUBLIC S16 SRandom
+S16 SRandom
 (
 Random *value               /* random number */
 )
 #else
-PUBLIC S16 SRandom(value)
+S16 SRandom(value)
 Random *value;              /* random number */
 #endif
 {
-   TRC1(SRandom);
 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -6536,15 +6465,14 @@ Random *value;              /* random number */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SExitTsk
+S16 SExitTsk
 (
 void
 )
 #else
-PUBLIC S16 SExitTsk()
+S16 SExitTsk()
 #endif
 {
-   TRC1(SExitTsk);
 
 
    return ROK;
@@ -6565,15 +6493,14 @@ PUBLIC S16 SExitTsk()
 *
 */
 #ifdef ANSI
-PUBLIC S16 SExitInt
+S16 SExitInt
 (
 void
 )
 #else
-PUBLIC S16 SExitInt()
+S16 SExitInt()
 #endif
 {
-   TRC1(SExitInt);
 
 
    return ROK;
@@ -6598,15 +6525,14 @@ PUBLIC S16 SExitInt()
 *
 */
 #ifdef ANSI
-PUBLIC S16 SHoldInt
+S16 SHoldInt
 (
 void
 )
 #else
-PUBLIC S16 SHoldInt()
+S16 SHoldInt()
 #endif
 {
-   TRC1(SHoldInt);
 
 
    return ROK;
@@ -6627,15 +6553,14 @@ PUBLIC S16 SHoldInt()
 *
 */
 #ifdef ANSI
-PUBLIC S16 SRelInt
+S16 SRelInt
 (
 void
 )
 #else
-PUBLIC S16 SRelInt()
+S16 SRelInt()
 #endif
 {
-   TRC1(SRelInt);
 
 
    return ROK;
@@ -6657,15 +6582,14 @@ PUBLIC S16 SRelInt()
 *
 */
 #ifdef ANSI
-PUBLIC INLINE S16 SEnbInt
+inline S16 SEnbInt
 (
 void
 )
 #else
-PUBLIC INLINE S16 SEnbInt()
+inline S16 SEnbInt()
 #endif
 {
-   TRC1(SEnbInt);
 
 
    return ROK;
@@ -6687,15 +6611,14 @@ PUBLIC INLINE S16 SEnbInt()
 *
 */
 #ifdef ANSI
-PUBLIC INLINE S16 SDisInt
+inline S16 SDisInt
 (
 void
 )
 #else
-PUBLIC INLINE S16 SDisInt()
+inline S16 SDisInt()
 #endif
 {
-   TRC1(SDisInt);
 
 
    return ROK;
@@ -6717,18 +6640,17 @@ PUBLIC INLINE S16 SDisInt()
 *
 */
 #ifdef ANSI
-PUBLIC S16 SGetVect
+S16 SGetVect
 (
 VectNmb vectNmb,                /* vector number */
 PIF *vectFnct                   /* vector function */
 )
 #else
-PUBLIC S16 SGetVect(vectNmb, vectFnct)
+S16 SGetVect(vectNmb, vectFnct)
 VectNmb vectNmb;                /* vector number */
 PIF *vectFnct;                  /* vector function */
 #endif
 {
-   TRC1(SGetVect);
 
 
    UNUSED(vectNmb);
@@ -6754,18 +6676,17 @@ PIF *vectFnct;                  /* vector function */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SPutVect
+S16 SPutVect
 (
 VectNmb vectNmb,                /* vector number */
 PIF vectFnct                    /* vector function */
 )
 #else
-PUBLIC S16 SPutVect(vectNmb, vectFnct)
+S16 SPutVect(vectNmb, vectFnct)
 VectNmb vectNmb;                /* vector number */
 PIF vectFnct;                   /* vector function */
 #endif
 {
-   TRC1(SPutVect);
 
 
    UNUSED(vectNmb);
@@ -6794,13 +6715,13 @@ PIF vectFnct;                   /* vector function */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SGetEntInst
+S16 SGetEntInst
 (
 Ent *ent,                       /* entity */
 Inst *inst                      /* instance */
 )
 #else
-PUBLIC S16 SGetEntInst(ent, inst)
+S16 SGetEntInst(ent, inst)
 Ent *ent;                       /* entity */
 Inst *inst;                     /* instance */
 #endif
@@ -6811,7 +6732,6 @@ Inst *inst;                     /* instance */
    SsSTskEntry *sTsk;
 
 
-   TRC1(SGetEntInst);
 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -6869,13 +6789,13 @@ Inst *inst;                     /* instance */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SSetEntInst
+S16 SSetEntInst
 (
 Ent ent,                    /* entity */
 Inst inst                   /* instance */
 )
 #else
-PUBLIC S16 SSetEntInst(ent, inst)
+S16 SSetEntInst(ent, inst)
 Ent ent;                    /* entity */
 Inst inst;                  /* instance */
 #endif
@@ -6886,7 +6806,6 @@ Inst inst;                  /* instance */
    SsSTskEntry *sTsk;
 
 
-   TRC1(SSetEntInst);
 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -6948,21 +6867,20 @@ Inst inst;                  /* instance */
 *
 */
 #ifdef ANSI
-PUBLIC INLINE S16 SSetIntPend
+inline S16 SSetIntPend
 (
-U16 id,                         /* driver task identifier */
+uint16_t id,                         /* driver task identifier */
 Bool flag                       /* flag */
 )
 #else
-PUBLIC INLINE S16 SSetIntPend(id, flag)
-U16 id;                         /* driver task identifier */
+inline S16 SSetIntPend(id, flag)
+uint16_t id;                         /* driver task identifier */
 Bool flag;                      /* flag */
 #endif
 {
    MtIsFlag isFlag;
 
 
-   TRC1(SSetIntPend);
 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -7004,19 +6922,18 @@ Bool flag;                      /* flag */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SGlobMemInfoShow
+S16 SGlobMemInfoShow
 (
 Void
 )
 #else
-PUBLIC S16 SGlobMemInfoShow()
+S16 SGlobMemInfoShow()
 #endif
 {
-   U16   idx;
+   uint16_t   idx;
    Txt   prntBuf[100];
    CmMmGlobRegCb   *globReg;
    
-   TRC1(SGlobMemInfoShow);
 
    globReg = osCp.globRegCb;
 
@@ -7106,21 +7023,20 @@ Bool IsMemoryThresholdHit(Region reg, Pool pool)
 *
 */
 #ifdef ANSI
-PUBLIC S16 SRegInfoShow
+S16 SRegInfoShow
 (
 Region region,
-U32 *availmem
+uint32_t *availmem
 )
 #else
-PUBLIC S16 SRegInfoShow(region, availmem)
+S16 SRegInfoShow(region, availmem)
 Region region;
-U32 *availmem;
+uint32_t *availmem;
 #endif
 {
-   U16   idx;
+   uint16_t   idx;
    Txt   prntBuf[100];
 
-   TRC1(SRegInfoShow);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (region > (SS_MAX_REGS-1) )
@@ -7211,23 +7127,23 @@ U32 *availmem;
 #ifdef XEON_SPECIFIC_CHANGES
 #define  SSI_MAX_BKT_THRESHOLD 6
 #define  SSI_MAX_REG_THRESHOLD 2
-U32 SMemMaxThreshold[SSI_MAX_REG_THRESHOLD][SSI_MAX_BKT_THRESHOLD] = {{0}};
-U32 SMemMidThreshold[SSI_MAX_REG_THRESHOLD][SSI_MAX_BKT_THRESHOLD] = {{0}};
-U32 SMemLowThreshold[SSI_MAX_REG_THRESHOLD][SSI_MAX_BKT_THRESHOLD] = {{0}};
+uint32_t SMemMaxThreshold[SSI_MAX_REG_THRESHOLD][SSI_MAX_BKT_THRESHOLD] = {{0}};
+uint32_t SMemMidThreshold[SSI_MAX_REG_THRESHOLD][SSI_MAX_BKT_THRESHOLD] = {{0}};
+uint32_t SMemLowThreshold[SSI_MAX_REG_THRESHOLD][SSI_MAX_BKT_THRESHOLD] = {{0}};
 
 #ifdef ANSI
-PRIVATE Void SInitMemThreshold
+static Void SInitMemThreshold
 (
 Region region,
-U8     maxBkt
+uint8_t     maxBkt
 )
 #else
-PRIVATE Void SInitMemThreshold(region, maxBkt)
+static Void SInitMemThreshold(region, maxBkt)
 Region region;
-U8     maxBkt;
+uint8_t     maxBkt;
 #endif
 {
-   U8   idx = 0;
+   uint8_t   idx = 0;
    for (idx = 0; (idx < maxBkt && idx < mtCMMRegCb[region]->numBkts); idx++)
    {
       SMemMaxThreshold[region][idx] = (mtCMMRegCb[region]->bktTbl[idx].numBlks*95)/100;
@@ -7238,20 +7154,20 @@ U8     maxBkt;
 }
 
 #ifdef ANSI
-PUBLIC S16 SRegReachedMemThreshold
+S16 SRegReachedMemThreshold
 (
 Region region,
-U8     maxBkt
+uint8_t     maxBkt
 )
 #else
-PUBLIC S16 SRegReachedMemThreshold(region, maxBkt)
+S16 SRegReachedMemThreshold(region, maxBkt)
 Region region;
-U8     maxBkt;
+uint8_t     maxBkt;
 #endif
 {
-   U8           idx       = 0;
-   U8           memStatus = 3;
-   PRIVATE U8   initFlag  = 1;
+   uint8_t           idx       = 0;
+   uint8_t           memStatus = 3;
+   static uint8_t   initFlag  = 1;
    if(initFlag)
    {
       initFlag = 0;
@@ -7295,20 +7211,19 @@ U8     maxBkt;
 *
 */
 #ifdef ANSI
-PUBLIC S16 SGetRegInfo
+S16 SGetRegInfo
 (
 Region region,
 SsMemDbgInfo *dbgInfo
 )
 #else
-PUBLIC S16 SGetRegInfo(region, dbgInfo)
+S16 SGetRegInfo(region, dbgInfo)
 Region region;
 SsMemDbgInfo *dbgInfo;
 #endif
 {
-   U32 idx;
+   uint32_t idx;
 
-   TRC1(SGetRegInfo);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (region >= mtMemoCfg.numRegions )
@@ -7353,15 +7268,15 @@ SsMemDbgInfo *dbgInfo;
 }
 
 #ifdef ANSI
-PUBLIC S16 SGetRegPoolInfo
+S16 SGetRegPoolInfo
 (
-U8 *numRegion,
-U8 *numPool
+uint8_t *numRegion,
+uint8_t *numPool
 )
 #else
-PUBLIC S16 SGetRegPoolInfo(numRegion, numPool)
-U8 *numRegion;
-U8 *numPool;
+S16 SGetRegPoolInfo(numRegion, numPool)
+uint8_t *numRegion;
+uint8_t *numPool;
 #endif
 {
    /* Send number of Region available */
@@ -7396,23 +7311,22 @@ U8 *numPool;
 *
 */
 #ifdef ANSI
-PUBLIC S16 SPrintRegMemStatusInfo
+S16 SPrintRegMemStatusInfo
 (
 Region region,
-U8 typeFlag
+uint8_t typeFlag
 )
 #else
-PUBLIC S16 SPrintRegMemStatusInfo(region, typeFlag)
+S16 SPrintRegMemStatusInfo(region, typeFlag)
 Region region;
-U8 typeFlag;
+uint8_t typeFlag;
 #endif
 {
    Txt prntBuf[150];
-   U32 idx;
-   U32 statMemSize;
-   U32 dynMemSize;
+   uint32_t idx;
+   uint32_t statMemSize;
+   uint32_t dynMemSize;
 
-   TRC1(SPrintRegMemStatusInfo);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (region >= mtMemoCfg.numRegions )
@@ -7511,21 +7425,20 @@ U8 typeFlag;
 *
 */
 #ifdef ANSI
-PRIVATE S16 SPrintRegMemStats
+static S16 SPrintRegMemStats
 (
 Region region
 )
 #else
-PRIVATE S16 SPrintRegMemStats(region)
+static S16 SPrintRegMemStats(region)
 Region region;
 #endif
 {
    CmMmHashListCp *hashListCp;
    Txt prntBuf[150];
-   U32 idx;
-   U32 cntEnt;
+   uint32_t idx;
+   uint32_t cntEnt;
 
-   TRC1(SPrintRegMemStats);
 
    hashListCp = &mtCMMRegCb[region]->hashListCp;
 
@@ -7618,14 +7531,14 @@ Region region;
 *
 */
 #ifdef ANSI
-PUBLIC Void SRegMemErrHdlr
+Void SRegMemErrHdlr
 (
 Region region,
 Data *ptr,
 S16 errCode
 )
 #else
-PUBLIC Void SRegMemErrHdlr(region, ptr, errCode)
+Void SRegMemErrHdlr(region, ptr, errCode)
 Region region;
 Data *ptr;
 S16 errCode;
@@ -7633,7 +7546,6 @@ S16 errCode;
 {
    Txt prntBuf[150];
 
-   TRC1(SRegMemErrHdlr);
 
    if (errCode == RDBLFREE)
    {
@@ -7646,7 +7558,7 @@ S16 errCode;
       SDisplay(0, prntBuf);
    }
 
-   RETVOID;
+   return;
 }
 
 /*
@@ -7666,12 +7578,12 @@ S16 errCode;
 *
 */
 #ifdef ANSI
-PUBLIC S16 SPrintRegMemProfile
+S16 SPrintRegMemProfile
 (
 Region region
 )
 #else
-PUBLIC S16 SPrintRegMemProfile(region)
+S16 SPrintRegMemProfile(region)
 Region region;
 #endif
 {
@@ -7682,11 +7594,10 @@ Region region;
    Size offsetToNxtBlk;
    Size hdrSize;
    Txt prntBuf[250];
-   U32 idx;
-   U32 blkCnt;
+   uint32_t idx;
+   uint32_t blkCnt;
 
 
-   TRC1(SPrintRegMemProfile);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (region >= mtMemoCfg.numRegions )
@@ -7901,12 +7812,12 @@ Region region;
 *
 --*/
 #ifdef ANSI
-PUBLIC S16 SGetTimeStamp
+S16 SGetTimeStamp
 (
 S8    *ts
 )
 #else
-PUBLIC S16 SGetTimeStamp(ts)
+S16 SGetTimeStamp(ts)
 S8    *ts;
 #endif
 {
@@ -7921,7 +7832,6 @@ S8    *ts;
    S8 time_string[40];
    S32 microseconds;
 
-   TRC1(SGetTimeStamp);
 
 #ifndef SS_LINUX
   clock_gettime(CLOCK_REALTIME, &ptime);
@@ -7972,15 +7882,14 @@ S8    *ts;
 *
 --*/
 #ifdef ANSI
-PUBLIC U32 SGetSystemTsk
+uint32_t SGetSystemTsk
 (
 Void
 )
 #else
-PUBLIC U32 SGetSystemTsk()
+uint32_t SGetSystemTsk()
 #endif
 {
-   TRC1(SGetSystemTskS);
 
    return (pthread_self());
 
@@ -8002,15 +7911,14 @@ PUBLIC U32 SGetSystemTsk()
 *
 --*/
 #ifdef ANSI
-PRIVATE SsSTskEntry* ssdAddTmrSTsk(Void)
+static SsSTskEntry* ssdAddTmrSTsk(Void)
 #else
-PRIVATE SsSTskEntry* ssdAddTmrSTsk()
+static SsSTskEntry* ssdAddTmrSTsk()
 #endif
 {
    SsSTskEntry *sTsk;
    S16 ret;
 
-   TRC1(ssdAddTmrSTsk);
    sTsk = NULLP;
    /* lock the system task table */
    ret = SLock(&osCp.sTskTblLock);
@@ -8133,15 +8041,15 @@ PRIVATE SsSTskEntry* ssdAddTmrSTsk()
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdInitLockNew
+S16 ssdInitLockNew
 (
 SLockInfo *lockId,
-U8        lockType
+uint8_t        lockType
 )
 #else
-PUBLIC S16 ssdInitLockNew(lockId, lockType)
+S16 ssdInitLockNew(lockId, lockType)
 SLockInfo *lockId;
-U8        lockType;
+uint8_t        lockType;
 #endif
 {
 
@@ -8151,7 +8059,6 @@ U8        lockType;
    Txt prntBuf[PRNTSZE];
    S16    retVal = ROK;
 
-   TRC1(ssdInitLockNew);
 
    switch(lockType)
    {
@@ -8224,22 +8131,21 @@ U8        lockType;
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdLockNew
+S16 ssdLockNew
 (
 SLockInfo *lockId,
-U8         lockType
+uint8_t         lockType
 )
 #else
-PUBLIC S16 ssdLockNew(lockId, lockType)
+S16 ssdLockNew(lockId, lockType)
 SLockInfo *lockId;
-U8         lockType;
+uint8_t         lockType;
 #endif
 {
 
    Txt prntBuf[PRNTSZE];
    S16    retVal = ROK;
 
-   TRC1(ssdLockNew);
 
    switch(lockType)
    {
@@ -8323,22 +8229,21 @@ U8         lockType;
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdUnlockNew
+S16 ssdUnlockNew
 (
 SLockInfo *lockId,
-U8        lockType
+uint8_t        lockType
 )
 #else
-PUBLIC S16 ssdUnlockNew(lockId, lockType)
+S16 ssdUnlockNew(lockId, lockType)
 SLockInfo *lockId;
-U8        lockType;
+uint8_t        lockType;
 #endif
 {
 
    Txt prntBuf[PRNTSZE];
    S16    retVal = ROK;
 
-   TRC1(ssdUnlockNew);
 
    switch(lockType)
    {
@@ -8390,21 +8295,20 @@ U8        lockType;
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdDestroyLockNew
+S16 ssdDestroyLockNew
 (
 SLockInfo *lockId,
-U8        lockType
+uint8_t        lockType
 )
 #else
-PUBLIC S16 ssdDestroyLockNew(lockId, lockType)
+S16 ssdDestroyLockNew(lockId, lockType)
 SLockInfo *lockId;
-U8        lockType;
+uint8_t        lockType;
 #endif
 {
    Txt prntBuf[PRNTSZE];
    S16    retVal = ROK;
 
-   TRC1(ssdDestroyLockNew);
 
    switch(lockType)
    {
@@ -8464,18 +8368,17 @@ U8        lockType;
  *
  **/
 #ifdef ANSI
-PUBLIC S16 ssInitRcvWork
+S16 ssInitRcvWork
 (
  void
  )
 #else
-PUBLIC S16 ssInitRcvWork()
+S16 ssInitRcvWork()
 #endif
 {
   pthread_attr_t attr;
   pthread_t      thread;
 
-  TRC1(ssInitRcvWork);
 
   /* set the required attributes */
   pthread_attr_init(&attr);
@@ -8517,12 +8420,12 @@ PUBLIC S16 ssInitRcvWork()
  **/
 
 #ifdef ANSI
-PRIVATE void *workRcvTsk
+static void *workRcvTsk
 (
  Ptr ptr
  )
 #else
-PRIVATE void *workRcvTsk (ptr)
+static void *workRcvTsk (ptr)
   Ptr ptr;
 #endif
 {
@@ -8534,7 +8437,6 @@ PRIVATE void *workRcvTsk (ptr)
   struct timespec ts;
   Pst         pst;
 
-  TRC1(workRcvTsk);
 
 
   for (;;)
@@ -8612,7 +8514,7 @@ PRIVATE void *workRcvTsk (ptr)
 #endif /* SS_SEUM_CAVIUM */
 
 #ifdef TENB_RTLIN_CHANGES
-PUBLIC S16 SInitLock(SLockId *l, U8 t)
+S16 SInitLock(SLockId *l, uint8_t t)
 {
    S16 r = 0;
    pthread_mutexattr_t prior;
@@ -8641,7 +8543,7 @@ PUBLIC S16 SInitLock(SLockId *l, U8 t)
  *
  */
 
-PUBLIC Void ssRegMainThread(Void)
+Void ssRegMainThread(Void)
 {
 
    if(SS_INVALID_THREAD_REG_MAP != SS_GET_THREAD_MEM_REGION())
@@ -8685,17 +8587,16 @@ PUBLIC Void ssRegMainThread(Void)
  *       File: mt_ss.c
  *
  */
-PUBLIC S32 ssCheckAndAddMemoryRegionMap
+S32 ssCheckAndAddMemoryRegionMap
 (
 pthread_t    threadId,    /* Thread Id of system task */
 Region       region       /* Region associated with thread */
 )
 {
-   PRIVATE U32       createdThreads;
-   PRIVATE pthread_t createdThreadIds[SS_MAX_THREAD_CREATE_RETRY];
-   U32               indx;
+   static uint32_t       createdThreads;
+   static pthread_t createdThreadIds[SS_MAX_THREAD_CREATE_RETRY];
+   uint32_t               indx;
 
-   TRC1(ssCheckAndAddMemoryRegionMap);
 
    /* Here  0xFF is considered as invalid region and if the mapping table
     * contains 0xFF, that mapping entry is free
@@ -8759,13 +8660,12 @@ Region       region       /* Region associated with thread */
  *       File: mt_ss.c
  *
  */
-PUBLIC S32 ssCheckAndDelMemoryRegionMap
+S32 ssCheckAndDelMemoryRegionMap
 (
 pthread_t    threadId    /* Thread Id of system task */
 )
 {
 
-   TRC1(ssCheckAndDelMemoryRegionMap);
 
    /* Raghu To-Do Check with team, is it necessary to acquire lock
     * as del and add may go parallel */
@@ -8776,9 +8676,9 @@ pthread_t    threadId    /* Thread Id of system task */
             osCp.threadMemoryRegionMap[((threadId >> SS_MEM_THREAD_ID_SHIFT) % SS_MAX_THREAD_REGION_MAP)])
    {
 #ifndef ALIGN_64BIT
-      printf("Invalid Thread ID (%ld)\n", (U32)threadId);
+      printf("Invalid Thread ID (%ld)\n", (uint32_t)threadId);
 #else
-      printf("Invalid Thread ID (%d)\n", (U32)threadId);
+      printf("Invalid Thread ID (%d)\n", (uint32_t)threadId);
 #endif
       return RFAILED;
    }
@@ -8808,15 +8708,15 @@ pthread_t    threadId    /* Thread Id of system task */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SStartTask
+S16 SStartTask
 (
-VOLATILE U32      *startTime,
-U32       taskId
+volatile uint32_t      *startTime,
+uint32_t       taskId
 )
 #else
-PUBLIC S16 SStartTask(startTime, taskId)
-VOLATILE U32      *startTime;
-U32       taskId;
+S16 SStartTask(startTime, taskId)
+volatile uint32_t      *startTime;
+uint32_t       taskId;
 #endif
 {
 #ifdef MSPD_MLOG_NEW
@@ -8841,18 +8741,18 @@ U32       taskId;
 *
 */
 #ifdef ANSI
-PUBLIC S16 SStopTask
+S16 SStopTask
 (
-VOLATILE U32       startTime,
-U32       taskId
+volatile uint32_t       startTime,
+uint32_t       taskId
 )
 #else
-PUBLIC S16 SStopTask(startTime, taskId)
-VOLATILE U32       startTime;
-U32       taskId;
+S16 SStopTask(startTime, taskId)
+volatile uint32_t       startTime;
+uint32_t       taskId;
 #endif
 {
-   /*U32      stopTime;*/
+   /*uint32_t      stopTime;*/
    switch(taskId)
    {
       case PID_MAC_HARQ_IND:
@@ -8890,15 +8790,15 @@ U32       taskId;
 }
 #else
 #ifdef ANSI
-PUBLIC S16 SStartTask
+S16 SStartTask
 (
-VOLATILE U32      * startTime,
-U32       taskId
+volatile uint32_t      * startTime,
+uint32_t       taskId
 )
 #else
-PUBLIC S16 SStartTask(startTime, taskId)
-VOLATILE U32      * startTime;
-U32       taskId;
+S16 SStartTask(startTime, taskId)
+volatile uint32_t      * startTime;
+uint32_t       taskId;
 #endif
 {
    *startTime = 0;
@@ -8906,15 +8806,15 @@ U32       taskId;
 }
 
 #ifdef ANSI
-PUBLIC S16 SStopTask
+S16 SStopTask
 (
-VOLATILE U32       startTime,
-U32       taskId
+volatile uint32_t       startTime,
+uint32_t       taskId
 )
 #else
-PUBLIC S16 SStopTask(startTime, taskId)
-VOLATILE U32       startTime;
-U32       taskId;
+S16 SStopTask(startTime, taskId)
+volatile uint32_t       startTime;
+uint32_t       taskId;
 #endif
 {
    return ROK;
@@ -8931,31 +8831,31 @@ U32       taskId;
 * @return  Void - function is always success
 */
 #ifdef ANSI
-PUBLIC Void UpdateSocCpuInfo
+Void UpdateSocCpuInfo
 (
 CmCpuStatsInfo *cpuInfo, 
-U8    idx
+uint8_t    idx
 )
 #else
-PUBLIC Void UpdateSocCpuInfo(*cpuInfo, idx)
+Void UpdateSocCpuInfo(*cpuInfo, idx)
 CmCpuStatsInfo *cpuInfo;
-U8       idx;
+uint8_t       idx;
 #endif
 {
    FILE       *mipsFd;
-   S8          mipsStr[MIPS_STRING_LEN];
+   S8         mipsStr[MIPS_STRING_LEN];
    S8         *strPart;
-   U32         l2FreeCpu;
-   U32         l2CpuUsed;
-   U32         l3FreeCpu;
-   U32         l3CpuUsed;
+   uint32_t   l2FreeCpu;
+   uint32_t   l2CpuUsed;
+   uint32_t   l3FreeCpu;
+   uint32_t   l3CpuUsed;
 
    /* Open the file which holds the MIPS available value */
    mipsFd = fopen(MIPS_FILE, "r");
 
    if(mipsFd == NULLP)
    {
-      RETVOID;
+      return;
    }
 
    /* Get the free mips available value from the file */
@@ -8963,7 +8863,7 @@ U8       idx;
    {
       printf("fgets to get the free mips available failed\n");
       fclose(mipsFd);
-      RETVOID;
+      return;
    }
 
    strtok(mipsStr, " ");
@@ -8977,7 +8877,7 @@ U8       idx;
          l2FreeCpu = atoi(strPart);   
          l2CpuUsed = 100 - l2FreeCpu;
          cpuInfo->cpuUtil[0].totCpuUtil += l2CpuUsed;
-         cpuInfo->cpuUtil[0].maxCpuUtil = GET_CPU_MAX((cpuInfo->cpuUtil[0].maxCpuUtil), l2CpuUsed);;
+         cpuInfo->cpuUtil[0].maxCpuUtil = GET_CPU_MAX((cpuInfo->cpuUtil[0].maxCpuUtil), l2CpuUsed);
          cpuInfo->cpuUtil[0].numSamples++;
       }
    }
@@ -8989,7 +8889,7 @@ U8       idx;
          l3FreeCpu = atoi(strPart);   
          l3CpuUsed = 100 - l3FreeCpu;
          cpuInfo->cpuUtil[0].totCpuUtil += l3CpuUsed;
-         cpuInfo->cpuUtil[0].maxCpuUtil = GET_CPU_MAX((cpuInfo->cpuUtil[0].maxCpuUtil), l3CpuUsed);;
+         cpuInfo->cpuUtil[0].maxCpuUtil = GET_CPU_MAX((cpuInfo->cpuUtil[0].maxCpuUtil), l3CpuUsed);
          cpuInfo->cpuUtil[0].numSamples++;
       }
    }
@@ -9003,7 +8903,7 @@ U8       idx;
    }
    fclose(mipsFd);
 
-   RETVOID;
+   return;
 }
 #endif /* TENB_T2K3K_SPECIFIC_CHANGES */
 #ifdef SS_MULTICORE_SUPPORT
@@ -9022,18 +8922,17 @@ U8       idx;
 *
 --*/
 #ifdef ANSI
-PRIVATE SsSTskEntry* ssdReAddTmrSTsk(
-U8 idx
+static SsSTskEntry* ssdReAddTmrSTsk(
+uint8_t idx
 )
 #else
-PRIVATE SsSTskEntry* ssdReAddTmrSTsk(idx)
-U8 idx;
+static SsSTskEntry* ssdReAddTmrSTsk(idx)
+uint8_t idx;
 #endif
 {
    SsSTskEntry *sTsk;
    S16 ret;
 
-   TRC1(ssdReAddTmrSTsk);
    sTsk = NULLP;
    /* lock the system task table */
    ret = SLock(&osCp.sTskTblLock);
@@ -9141,27 +9040,26 @@ U8 idx;
 *
 */
 #ifdef ANSI
-PUBLIC S16 ssdReInitTmr
+S16 ssdReInitTmr
 (
 void
 )
 #else
-PUBLIC S16 ssdReInitTmr()
+S16 ssdReInitTmr()
 #endif
 {
    pthread_attr_t attr;
    struct sched_param param_sched;
 #ifndef XEON_SPECIFIC_CHANGES
-   U8 ret = ROK;
+   uint8_t ret = ROK;
 #endif
 #ifdef SS_MULTICORE_SUPPORT
    SsSTskEntry     *sTsk;
 #endif /* SS_MULTICORE_SUPPORT */
 #ifdef SS_THR_REG_MAP
-   U32 threadCreated = FALSE;
+   uint32_t threadCreated = FALSE;
 #endif /* SS_THR_REG_MAP */
 
-   TRC0(ssdReInitTmr);
 
 #ifndef XEON_SPECIFIC_CHANGES
    ret = ssCheckAndDelMemoryRegionMap(osCp.dep.tmrHdlrTID);