X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fmt%2Fmt_ss.c;h=9626822368272fb0aebb766f0246b5a36c49326c;hb=5d74fef7c9fe6b65a965ceac6bfe812872dab323;hp=ea4ec29e10aa719fc3329c027e35d4cca6b73233;hpb=aee73991f728cc127d1ed76d5a52571d916235a4;p=o-du%2Fl2.git diff --git a/src/mt/mt_ss.c b/src/mt/mt_ss.c index ea4ec29e1..962682236 100644 --- a/src/mt/mt_ss.c +++ b/src/mt/mt_ss.c @@ -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 #include @@ -62,11 +59,7 @@ /* 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" @@ -326,11 +318,11 @@ 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; @@ -349,9 +341,9 @@ EXTERN unsigned int tlPost(void *handle); /* 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)); @@ -407,9 +399,9 @@ PRIVATE 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 */ /* type declarations */ @@ -427,13 +419,13 @@ typedef struct mtIsFlag /* 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,11 +705,11 @@ 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 @@ -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,15 +1065,14 @@ 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); @@ -1110,14 +1098,14 @@ PUBLIC Void ssdDeinitGen() * */ #ifdef ANSI -PUBLIC S16 ssPutDynMemBlkSet +S16 ssPutDynMemBlkSet ( U8 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) +S16 ssPutDynMemBlkSet(bktIdx, dynMemSetElem) U8 bktIdx; /* Index to bucket list */ CmMmBlkSetElement *dynMemSetElem; /* Memory set element which is needs to be added to global region */ @@ -1168,14 +1156,14 @@ CmMmBlkSetElement *dynMemSetElem; /* Memory set element which is needs to be * */ #ifdef ANSI -PUBLIC S16 ssGetDynMemBlkSet +S16 ssGetDynMemBlkSet ( U8 bktIdx, /* Index to bucket list */ CmMmBlkSetElement *dynMemSetElem /* Memory set element which is updated with new set values */ ) #else -PUBLIC S16 ssGetDynMemBlkSet(bktIdx, dynMemSetElem) +S16 ssGetDynMemBlkSet(bktIdx, dynMemSetElem) U8 bktIdx; /* Index to bucket list */ CmMmBlkSetElement *dynMemSetElem; /* Memory set element which is updated with new set values */ @@ -1230,7 +1218,7 @@ CmMmBlkSetElement *dynMemSetElem; /* Memory set element which is updated * */ #ifdef ANSI -PUBLIC S16 ssPutDynMemBlkSet +S16 ssPutDynMemBlkSet ( U8 bktIdx, /* Index to bucket list */ CmMmBlkSetElement *dynMemSetElem, /* Memory set element which is needs to be @@ -1238,7 +1226,7 @@ CmMmBlkSetElement *dynMemSetElem, /* Memory set element which is needs U32 doNotBlockForLock /* Boolean whether to block for lock or not */ ) #else -PUBLIC S16 ssPutDynMemBlkSet(bktIdx, dynMemSetElem) +S16 ssPutDynMemBlkSet(bktIdx, dynMemSetElem) U8 bktIdx; /* Index to bucket list */ CmMmBlkSetElement *dynMemSetElem; /* Memory set element which is needs to be added to global region */ @@ -1251,7 +1239,6 @@ U32 doNotBlockForLock; /* Boolean whether to block for lock CmMmBlkSetElement *globMemNode; S16 lockRet = 0; - TRC1(ssPutDynMemBlkSet); globReg = osCp.globRegCb; @@ -1318,7 +1305,7 @@ U32 doNotBlockForLock; /* Boolean whether to block for lock * */ #ifdef ANSI -PUBLIC S16 ssGetDynMemBlkSet +S16 ssGetDynMemBlkSet ( U8 bktIdx, /* Index to bucket list */ CmMmBlkSetElement *dynMemSetElem, /* Memory set element which is updated @@ -1326,7 +1313,7 @@ CmMmBlkSetElement *dynMemSetElem, /* Memory set element which is updat U32 doNotBlockForLock /* Boolean whether to block for lock or not */ ) #else -PUBLIC S16 ssGetDynMemBlkSet(bktIdx, dynMemSetElem) +S16 ssGetDynMemBlkSet(bktIdx, dynMemSetElem) U8 bktIdx; /* Index to bucket list */ CmMmBlkSetElement *dynMemSetElem; /* Memory set element which is updated with new set values */ @@ -1339,7 +1326,6 @@ U32 doNotBlockForLock; /* Boolean whether to block for lock CmMmBlkSetElement *globMemNode; S16 lockRet = 0; - TRC1(ssGetDynMemBlkSet); globReg = osCp.globRegCb; @@ -1392,18 +1378,17 @@ U32 gDynMemAlrm[4]; PRIVATE U32 memoryCheckCounter; #ifdef ANSI -PUBLIC U32 isMemThreshReached( +U32 isMemThreshReached( Region reg ) #else -PUBLIC U32 isMemThreshReached(reg) +U32 isMemThreshReached(reg) Region reg; #endif { CmMmGlobRegCb *globReg; CmMmGlobalBktCb *bktCb; U8 bktIdx= reg; - TRC3(isMemThreshReached) 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 { @@ -1493,7 +1478,7 @@ extern RegionMemLeakInfo regMemLeakInfo; #ifdef INTEL_WLS -PUBLIC S16 SPartitionWlsMemory() +S16 SPartitionWlsMemory() { U32 i; #ifndef ALIGN_64BIT @@ -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,7 +1539,7 @@ PUBLIC Void SChkAddrValid(int type, int region, PTR ptr) } #endif /* SS_MEM_WL_DEBUG */ -PUBLIC S16 SPartitionStaticMemory(U8 *startAddr) +S16 SPartitionStaticMemory(U8 *startAddr) { int i; U32 reqdSz; @@ -1577,7 +1562,7 @@ PUBLIC S16 SPartitionStaticMemory(U8 *startAddr) } return ROK; } -PUBLIC S16 SAllocateWlsMem() +S16 SAllocateWlsMem() { U32 reqdMemSz; @@ -1611,7 +1596,7 @@ PUBLIC S16 SAllocateWlsMem() SPartitionWlsMemory(); return ROK; } -PUBLIC S16 SAllocateStaticMem() +S16 SAllocateStaticMem() { U32 reqdMemSz; @@ -1666,12 +1651,12 @@ PUBLIC S16 SAllocateStaticMem() * */ #ifdef ANSI -PUBLIC S16 ssdInitMem +S16 ssdInitMem ( void ) #else -PUBLIC S16 ssdInitMem() +S16 ssdInitMem() #endif { /* mt018.201 - added local variable */ @@ -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 @@ -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; - TRC0(ssdDeinitMem); /* mt008.301 Additions */ #ifdef SS_MEM_LEAK_STS cmDeinitMemLeakMdl(); @@ -2018,12 +2001,12 @@ PUBLIC Void ssdDeinitMem() * */ #ifdef ANSI -PUBLIC S16 ssdInitTsk +S16 ssdInitTsk ( void ) #else -PUBLIC S16 ssdInitTsk() +S16 ssdInitTsk() #endif { /* mt001.301 : Additions */ @@ -2032,7 +2015,6 @@ PUBLIC S16 ssdInitTsk() U32 tskInd = 0; #endif /* SS_MULTICORE_SUPPORT || SS_AFFINITY_SUPPORT */ - TRC0(ssdInitTsk); /*mt013.301 :Added SS_AFFINITY_SUPPORT */ @@ -2062,15 +2044,14 @@ PUBLIC S16 ssdInitTsk() * */ #ifdef ANSI -PUBLIC Void ssdDeinitTsk +Void ssdDeinitTsk ( void ) #else -PUBLIC Void ssdDeinitTsk() +Void ssdDeinitTsk() #endif { - TRC0(ssdDeinitTsk); RETVOID; } @@ -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)); @@ -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; @@ -2230,7 +2209,6 @@ PUBLIC S16 ssdInitTmr() U32 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); @@ -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 */ @@ -2506,12 +2481,12 @@ PUBLIC Void ssdDeinitLog() #ifdef ANSI -PUBLIC S16 ssdInitWatchDog +S16 ssdInitWatchDog ( U16 port ) #else -PUBLIC S16 ssdInitWatchDog(port) +S16 ssdInitWatchDog(port) U16 port; #endif { @@ -2532,7 +2507,6 @@ U16 port; } #endif /* SS_MULTIPLE_PROCS */ - TRC0(ssdInitWatchDog); SInitLock(&osCp.wdCp.wdLock, SS_LOCK_MUTEX); @@ -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,14 +2719,14 @@ S16 event; /* timer number */ } #ifdef ANSI -PUBLIC Void ssdStartWatchDgTmr +Void ssdStartWatchDgTmr ( void *cb, S16 event, U16 wait ) #else -PUBLIC Void ssdStartWatchDgTmr(cb, event, wait) +Void ssdStartWatchDgTmr(cb, event, wait) void *cb; S16 event; U16 wait; @@ -2769,7 +2740,6 @@ U16 wait; #endif - TRC2(ssStartWatchDgTmr) /* mt003.301 Modifications */ #ifdef DEBUGP SGetDateTime(&dt); @@ -2804,13 +2774,13 @@ U16 wait; } #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); @@ -2855,13 +2824,13 @@ S16 event; } #ifdef ANSI -PUBLIC S16 ssdSndHrtBtMsg +S16 ssdSndHrtBtMsg ( Bool restart, U32 type ) #else -PUBLIC S16 ssdSndHrtBtMsg(restart, type) +S16 ssdSndHrtBtMsg(restart, type) Bool restart; U32 type; #endif @@ -2876,7 +2845,6 @@ U32 type; int n; int err; - TRC2(ssdSndHrtBtReq) #ifdef DEBUGP SGetDateTime(&dt); @@ -2990,7 +2958,6 @@ PRIVATE Void mtGetOpts() Cntr idx=0; #endif - TRC0(mtGetOpts); msOptInd = 1; @@ -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 */ @@ -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,15 +3573,16 @@ 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;*/ @@ -3630,7 +3590,6 @@ SsSTskEntry *sTsk; /* pointer to system task entry */ U32 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 */ @@ -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 *); @@ -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__); { @@ -3834,7 +3794,6 @@ pthread_attr_t *attr { struct sched_param param; - TRC0 (ssdSetPthreadAttr) SMemSet(¶m, 0, sizeof(param)); @@ -3900,13 +3859,13 @@ 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 */ ) #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 */ #endif @@ -3925,7 +3884,6 @@ U32 *coreId; /* the core/processor id to which the affinity i U32 lwpId = *tskId; #endif /*SUNOS*/ #endif /*SS_LINUX*/ - TRC0(ssdGetAffinity); #ifdef SS_LINUX for (tskInd = 0; tskInd < SS_MAX_STSKS; tskInd++) { @@ -4017,13 +3975,13 @@ 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 */ ) #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 */ #endif @@ -4041,7 +3999,6 @@ U32 coreId; /* the core/processor id to which the affinity h #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 */ @@ -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 */ @@ -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; @@ -4747,12 +4695,12 @@ EXTERN Void ysMtTskHdlr(Void); EXTERN Void ysMtPollPhyMsg(U8 region); EXTERN 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 { @@ -4783,12 +4731,12 @@ Ptr tskPtr; /* pointer to task entry */ EXTERN Void ysMtTskHdlr(Void); EXTERN 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 { @@ -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) @@ -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 @@ -5589,7 +5537,6 @@ S16 evnt; /* event */ #endif #endif - TRC0(mtTimeout); /* get the timer entry */ @@ -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 @@ -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) @@ -6308,12 +6241,12 @@ 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 { @@ -6327,7 +6260,6 @@ PRIVATE U64 now; 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,14 +6354,14 @@ Ticks *sysTime; /* system time */ * */ #ifdef ANSI -PUBLIC S16 SGetRefTime +S16 SGetRefTime ( U32 refTime, /* reference time */ U32 *sec, U32 *usec ) #else -PUBLIC S16 SGetRefTime(refTime, sec, usec) +S16 SGetRefTime(refTime, sec, usec) U32 refTime; /* reference time */ U32 *sec; U32 *usec; @@ -6443,7 +6374,6 @@ U32 *usec; struct timeval ptime; #endif - TRC1(SGetSysTime); #ifndef SS_LINUX clock_gettime(CLOCK_REALTIME, &ptime); @@ -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,13 +6867,13 @@ Inst inst; /* instance */ * */ #ifdef ANSI -PUBLIC INLINE S16 SSetIntPend +INLINE S16 SSetIntPend ( U16 id, /* driver task identifier */ Bool flag /* flag */ ) #else -PUBLIC INLINE S16 SSetIntPend(id, flag) +INLINE S16 SSetIntPend(id, flag) U16 id; /* driver task identifier */ Bool flag; /* flag */ #endif @@ -6962,7 +6881,6 @@ Bool flag; /* flag */ 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; Txt prntBuf[100]; CmMmGlobRegCb *globReg; - TRC1(SGlobMemInfoShow); globReg = osCp.globRegCb; @@ -7106,13 +7023,13 @@ Bool IsMemoryThresholdHit(Region reg, Pool pool) * */ #ifdef ANSI -PUBLIC S16 SRegInfoShow +S16 SRegInfoShow ( Region region, U32 *availmem ) #else -PUBLIC S16 SRegInfoShow(region, availmem) +S16 SRegInfoShow(region, availmem) Region region; U32 *availmem; #endif @@ -7120,7 +7037,6 @@ U32 *availmem; U16 idx; Txt prntBuf[100]; - TRC1(SRegInfoShow); #if (ERRCLASS & ERRCLS_INT_PAR) if (region > (SS_MAX_REGS-1) ) @@ -7238,13 +7154,13 @@ U8 maxBkt; } #ifdef ANSI -PUBLIC S16 SRegReachedMemThreshold +S16 SRegReachedMemThreshold ( Region region, U8 maxBkt ) #else -PUBLIC S16 SRegReachedMemThreshold(region, maxBkt) +S16 SRegReachedMemThreshold(region, maxBkt) Region region; U8 maxBkt; #endif @@ -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; - TRC1(SGetRegInfo); #if (ERRCLASS & ERRCLS_INT_PAR) if (region >= mtMemoCfg.numRegions ) @@ -7353,13 +7268,13 @@ SsMemDbgInfo *dbgInfo; } #ifdef ANSI -PUBLIC S16 SGetRegPoolInfo +S16 SGetRegPoolInfo ( U8 *numRegion, U8 *numPool ) #else -PUBLIC S16 SGetRegPoolInfo(numRegion, numPool) +S16 SGetRegPoolInfo(numRegion, numPool) U8 *numRegion; U8 *numPool; #endif @@ -7396,13 +7311,13 @@ U8 *numPool; * */ #ifdef ANSI -PUBLIC S16 SPrintRegMemStatusInfo +S16 SPrintRegMemStatusInfo ( Region region, U8 typeFlag ) #else -PUBLIC S16 SPrintRegMemStatusInfo(region, typeFlag) +S16 SPrintRegMemStatusInfo(region, typeFlag) Region region; U8 typeFlag; #endif @@ -7412,7 +7327,6 @@ U8 typeFlag; U32 statMemSize; U32 dynMemSize; - TRC1(SPrintRegMemStatusInfo); #if (ERRCLASS & ERRCLS_INT_PAR) if (region >= mtMemoCfg.numRegions ) @@ -7525,7 +7439,6 @@ Region region; U32 idx; U32 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) { @@ -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 { @@ -7686,7 +7598,6 @@ Region region; U32 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 +U32 SGetSystemTsk ( Void ) #else -PUBLIC U32 SGetSystemTsk() +U32 SGetSystemTsk() #endif { - TRC1(SGetSystemTskS); return (pthread_self()); @@ -8010,7 +7919,6 @@ PRIVATE SsSTskEntry* ssdAddTmrSTsk() SsSTskEntry *sTsk; S16 ret; - TRC1(ssdAddTmrSTsk); sTsk = NULLP; /* lock the system task table */ ret = SLock(&osCp.sTskTblLock); @@ -8133,13 +8041,13 @@ PRIVATE SsSTskEntry* ssdAddTmrSTsk() * */ #ifdef ANSI -PUBLIC S16 ssdInitLockNew +S16 ssdInitLockNew ( SLockInfo *lockId, U8 lockType ) #else -PUBLIC S16 ssdInitLockNew(lockId, lockType) +S16 ssdInitLockNew(lockId, lockType) SLockInfo *lockId; U8 lockType; #endif @@ -8151,7 +8059,6 @@ U8 lockType; Txt prntBuf[PRNTSZE]; S16 retVal = ROK; - TRC1(ssdInitLockNew); switch(lockType) { @@ -8224,13 +8131,13 @@ U8 lockType; * */ #ifdef ANSI -PUBLIC S16 ssdLockNew +S16 ssdLockNew ( SLockInfo *lockId, U8 lockType ) #else -PUBLIC S16 ssdLockNew(lockId, lockType) +S16 ssdLockNew(lockId, lockType) SLockInfo *lockId; U8 lockType; #endif @@ -8239,7 +8146,6 @@ U8 lockType; Txt prntBuf[PRNTSZE]; S16 retVal = ROK; - TRC1(ssdLockNew); switch(lockType) { @@ -8323,13 +8229,13 @@ U8 lockType; * */ #ifdef ANSI -PUBLIC S16 ssdUnlockNew +S16 ssdUnlockNew ( SLockInfo *lockId, U8 lockType ) #else -PUBLIC S16 ssdUnlockNew(lockId, lockType) +S16 ssdUnlockNew(lockId, lockType) SLockInfo *lockId; U8 lockType; #endif @@ -8338,7 +8244,6 @@ U8 lockType; Txt prntBuf[PRNTSZE]; S16 retVal = ROK; - TRC1(ssdUnlockNew); switch(lockType) { @@ -8390,13 +8295,13 @@ U8 lockType; * */ #ifdef ANSI -PUBLIC S16 ssdDestroyLockNew +S16 ssdDestroyLockNew ( SLockInfo *lockId, U8 lockType ) #else -PUBLIC S16 ssdDestroyLockNew(lockId, lockType) +S16 ssdDestroyLockNew(lockId, lockType) SLockInfo *lockId; U8 lockType; #endif @@ -8404,7 +8309,6 @@ U8 lockType; 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); @@ -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, U8 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,7 +8587,7 @@ 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 */ @@ -8695,7 +8597,6 @@ Region region /* Region associated with thread */ PRIVATE pthread_t createdThreadIds[SS_MAX_THREAD_CREATE_RETRY]; U32 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 */ @@ -8808,13 +8708,13 @@ pthread_t threadId /* Thread Id of system task */ * */ #ifdef ANSI -PUBLIC S16 SStartTask +S16 SStartTask ( VOLATILE U32 *startTime, U32 taskId ) #else -PUBLIC S16 SStartTask(startTime, taskId) +S16 SStartTask(startTime, taskId) VOLATILE U32 *startTime; U32 taskId; #endif @@ -8841,13 +8741,13 @@ U32 taskId; * */ #ifdef ANSI -PUBLIC S16 SStopTask +S16 SStopTask ( VOLATILE U32 startTime, U32 taskId ) #else -PUBLIC S16 SStopTask(startTime, taskId) +S16 SStopTask(startTime, taskId) VOLATILE U32 startTime; U32 taskId; #endif @@ -8890,13 +8790,13 @@ U32 taskId; } #else #ifdef ANSI -PUBLIC S16 SStartTask +S16 SStartTask ( VOLATILE U32 * startTime, U32 taskId ) #else -PUBLIC S16 SStartTask(startTime, taskId) +S16 SStartTask(startTime, taskId) VOLATILE U32 * startTime; U32 taskId; #endif @@ -8906,13 +8806,13 @@ U32 taskId; } #ifdef ANSI -PUBLIC S16 SStopTask +S16 SStopTask ( VOLATILE U32 startTime, U32 taskId ) #else -PUBLIC S16 SStopTask(startTime, taskId) +S16 SStopTask(startTime, taskId) VOLATILE U32 startTime; U32 taskId; #endif @@ -8931,13 +8831,13 @@ U32 taskId; * @return Void - function is always success */ #ifdef ANSI -PUBLIC Void UpdateSocCpuInfo +Void UpdateSocCpuInfo ( CmCpuStatsInfo *cpuInfo, U8 idx ) #else -PUBLIC Void UpdateSocCpuInfo(*cpuInfo, idx) +Void UpdateSocCpuInfo(*cpuInfo, idx) CmCpuStatsInfo *cpuInfo; U8 idx; #endif @@ -9033,7 +8933,6 @@ U8 idx; SsSTskEntry *sTsk; S16 ret; - TRC1(ssdReAddTmrSTsk); sTsk = NULLP; /* lock the system task table */ ret = SLock(&osCp.sTskTblLock); @@ -9141,12 +9040,12 @@ U8 idx; * */ #ifdef ANSI -PUBLIC S16 ssdReInitTmr +S16 ssdReInitTmr ( void ) #else -PUBLIC S16 ssdReInitTmr() +S16 ssdReInitTmr() #endif { pthread_attr_t attr; @@ -9161,7 +9060,6 @@ PUBLIC S16 ssdReInitTmr() U32 threadCreated = FALSE; #endif /* SS_THR_REG_MAP */ - TRC0(ssdReInitTmr); #ifndef XEON_SPECIFIC_CHANGES ret = ssCheckAndDelMemoryRegionMap(osCp.dep.tmrHdlrTID);