X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fmt%2Fmt_ss.c;h=4a950eb2b7f9d6f77a6da9099be3e97c4909e133;hb=51e17cba646f833c1af8b1945248de43e0fdd50f;hp=427c89dc12e1a4eece1cc2819a11622f6a5c49e5;hpb=deeae2741b8520edcd37ecb20a40f1de821ceadf;p=o-du%2Fl2.git diff --git a/src/mt/mt_ss.c b/src/mt/mt_ss.c index 427c89dc1..4a950eb2b 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" @@ -757,7 +749,7 @@ unsigned int mtGetNtlHdl() void * mtGetWlsHdl() { - RETVALUE(osCp.wls.intf); + return (osCp.wls.intf); } #ifdef XEON_MULTIPLE_CELL_CHANGES @@ -785,10 +777,10 @@ PRIVATE int SOpenWlsIntf() if(!osCp.wls.intf) { printf("Could not open WLS Interface \n"); - RETVALUE(0); + return (0); } - RETVALUE(1); + return (1); } #endif @@ -830,13 +822,13 @@ char **argv; /* argument vector */ if(smWrReadWlsConfigParams() != ROK) { fprintf(stderr, "Failed to read WLS params from file wr_cfg.txt"); - RETVALUE(RFAILED); + return RFAILED; } /* end of if statement */ #endif #ifdef INTEL_WLS if(!SOpenWlsIntf()) - RETVALUE(0); + return (0); #endif /* INTEL_WLS */ msArgc = argc; @@ -847,11 +839,11 @@ char **argv; /* argument vector */ printf("\n SInit failed, SSI could not start \n"); /* pthread_exit(NULLP);*/ /* Commented to Come out of Main thread*/ - RETVALUE(0); + return (0); } /*mt010.301 cleanup part exposed to user*/ SFini(); - RETVALUE(0); + return (0); } #else @@ -893,7 +885,7 @@ char **argv; /* argument vector */ SInit(); - RETVALUE(0); + return (0); } #endif @@ -952,7 +944,7 @@ PUBLIC S16 ssdInitGen() if(fileBasedMemCfg == TRUE && memConfigured == FALSE) { printf("\n File Based Memory configuration failed \n"); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -968,7 +960,7 @@ PUBLIC S16 ssdInitGen() /* initialize the started semaphore */ if (sem_init(&osCp.dep.ssStarted, 0, 0) != 0) { - RETVALUE(RFAILED); + return RFAILED; } /* mt028.201 added compile time flag to allow not to mask signals */ @@ -1012,27 +1004,27 @@ PUBLIC S16 ssdInitGen() if(sigaction(SIGILL, &sa, NULL) != 0) { printf("Failed to process sigaction for the SIGILL\n"); - RETVALUE(RFAILED); + return RFAILED; } if(sigaction(SIGSEGV, &sa, NULL) != 0) { printf("Failed to process sigaction for the SIGSEGV\n"); - RETVALUE(RFAILED); + return RFAILED; } if(sigaction(SIGABRT, &sa, NULL) != 0) { printf("Failed to process sigaction for the SIGABRT\n"); - RETVALUE(RFAILED); + return RFAILED; } if(sigaction(SIGTERM, &sa, NULL) != 0) { printf("Failed to process sigaction for the SIGTERM\n"); - RETVALUE(RFAILED); + return RFAILED; } if(sigaction(SIGHUP, &sa, NULL) != 0) { printf("Failed to process sigaction for the SIGHUP\n"); - RETVALUE(RFAILED); + return RFAILED; } #endif #else @@ -1051,14 +1043,14 @@ PUBLIC S16 ssdInitGen() act.sa_flags = 0; if (sigaction(SIGINT, &act, NULLP) != 0) { - RETVALUE(RFAILED); + return RFAILED; } #endif /* mt040.201 initialise random seed */ osCp.dep.randSeed = time(NULLP); - RETVALUE(ROK); + return ROK; } @@ -1133,7 +1125,7 @@ CmMmBlkSetElement *dynMemSetElem; /* Memory set element which is needs to be #if (ERRCLASS & ERRCLS_INT_PAR) if(bktIdx >= globReg->numBkts) { - RETVALUE(RFAILED); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1149,7 +1141,7 @@ CmMmBlkSetElement *dynMemSetElem; /* Memory set element which is needs to be dynMemSetElem->nextBktPtr = NULLP; dynMemSetElem->numFreeBlks = 0; - RETVALUE(ROK); + return ROK; } /* @@ -1193,7 +1185,7 @@ CmMmBlkSetElement *dynMemSetElem; /* Memory set element which is updated #if (ERRCLASS & ERRCLS_INT_PAR) if(bktIdx >= globReg->numBkts) { - RETVALUE(RFAILED); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1209,7 +1201,7 @@ CmMmBlkSetElement *dynMemSetElem; /* Memory set element which is updated dynMemSetElem->numFreeBlks = bktCb->bucketSetSize; - RETVALUE(ROK); + return ROK; } /* ssGetDynMemBlkSet */ @@ -1258,7 +1250,7 @@ U32 doNotBlockForLock; /* Boolean whether to block for lock #if (ERRCLASS & ERRCLS_INT_PAR) if(bktIdx >= globReg->numBkts) { - RETVALUE(RFAILED); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1280,7 +1272,7 @@ U32 doNotBlockForLock; /* Boolean whether to block for lock if(lstNode == NULLP) { SUnlock(&(bktCb->bucketLock)); - RETVALUE(RFAILED); + return RFAILED; } cmLListDelFrm(&(bktCb->listFreeBktSet), lstNode); @@ -1298,7 +1290,7 @@ U32 doNotBlockForLock; /* Boolean whether to block for lock SUnlock(&(bktCb->bucketLock)); } - RETVALUE(ROK); + return ROK; } /* @@ -1346,7 +1338,7 @@ U32 doNotBlockForLock; /* Boolean whether to block for lock #if (ERRCLASS & ERRCLS_INT_PAR) if(bktIdx >= globReg->numBkts) { - RETVALUE(RFAILED); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1367,7 +1359,7 @@ U32 doNotBlockForLock; /* Boolean whether to block for lock if(lstNode == NULLP) { SUnlock(&(bktCb->bucketLock)); - RETVALUE(RFAILED); + return RFAILED; } /* Delete the node from the valid linked list and copy the values of the @@ -1383,7 +1375,7 @@ U32 doNotBlockForLock; /* Boolean whether to block for lock SUnlock(&(bktCb->bucketLock)); } - RETVALUE(ROK); + return ROK; } /* ssGetDynMemBlkSet */ @@ -1410,7 +1402,7 @@ Region reg; #if (ERRCLASS & ERRCLS_INT_PAR) if(bktIdx >= globReg->numBkts) { - RETVALUE(RFAILED); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -1426,7 +1418,7 @@ Region reg; // printf ("recoverd bktCb->listValidBktSet.count %d bktIdx %d\n",bktCb->listValidBktSet.count ,bktIdx); } SUnlock(&(bktCb->bucketLock)); - RETVALUE(RFAILED); + return RFAILED; } else { @@ -1441,7 +1433,7 @@ Region reg; SUnlock(&(bktCb->bucketLock)); } } - RETVALUE(ROK); + return ROK; } #endif /* USE_MALLOC */ @@ -1478,12 +1470,12 @@ Region region; /* Klock work fix ccpu00148484 */ if(!(region < SS_MAX_REGS)) { - RETVALUE(NULLP); + return (NULLP); } dynRegCb = (CmMmDynRegCb *)osCp.dynRegionTbl[region].regCb; - RETVALUE(dynRegCb->iccHdl); + return (dynRegCb->iccHdl); } #endif /* SS_USE_ICC_MEMORY */ @@ -1526,7 +1518,7 @@ PUBLIC S16 SPartitionWlsMemory() } //Store last region addr for validation mtRegMemSz[i].startAddr = regMemStrtAddr; - RETVALUE(ROK); + return ROK; } #ifdef SS_MEM_WL_DEBUG @@ -1575,7 +1567,7 @@ PUBLIC S16 SPartitionStaticMemory(U8 *startAddr) } #endif /* T2K_MEM_LEAK_DBG */ } - RETVALUE(ROK); + return ROK; } PUBLIC S16 SAllocateWlsMem() { @@ -1609,7 +1601,7 @@ PUBLIC S16 SAllocateWlsMem() printf("\n ************* \n WLS memory: %lx, %d\n ****** \n", (PTR)osCp.wls.allocAddr, reqdMemSz); #endif SPartitionWlsMemory(); - RETVALUE(ROK); + return ROK; } PUBLIC S16 SAllocateStaticMem() { @@ -1644,7 +1636,7 @@ PUBLIC S16 SAllocateStaticMem() printf("\n ************* \n Static memory: %lx, %d\n ****** \n", (PTR)startAddr, reqdMemSz); #endif SPartitionStaticMemory(startAddr); - RETVALUE(ROK); + return ROK; } #endif /* INTEL_WLS */ @@ -1703,7 +1695,7 @@ PUBLIC S16 ssdInitMem() dynRegCb = (CmMmDynRegCb *)calloc(1, sizeof(CmMmDynRegCb)); if(dynRegCb == NULLP) { - RETVALUE(RFAILED); + return RFAILED; } for(k = 0; k < mtDynMemoCfg.region[i].numBkts; k++) { @@ -1722,7 +1714,7 @@ PUBLIC S16 ssdInitMem() if(osCp.globRegCb == NULLP) { - RETVALUE(RFAILED); + return RFAILED; } globReg = (CmMmGlobRegCb *)osCp.globRegCb; @@ -1737,7 +1729,7 @@ PUBLIC S16 ssdInitMem() #endif if(globReg->bktTbl[i].startAddr == NULLP) { - RETVALUE(RFAILED); + return RFAILED; } globReg->bktTbl[i].poolId = i; globReg->bktTbl[i].size = mtGlobMemoCfg.bkt[i].blkSize; @@ -1755,7 +1747,7 @@ PUBLIC S16 ssdInitMem() dynRegCb = (CmMmDynRegCb *)calloc(1, sizeof(CmMmDynRegCb)); if(dynRegCb == NULLP) { - RETVALUE(RFAILED); + return RFAILED; } for(k = 0; k < mtDynMemoCfg.region[i].numBkts; k++) { @@ -1767,7 +1759,7 @@ PUBLIC S16 ssdInitMem() #ifdef XEON_SPECIFIC_CHANGES free(dynRegCb); #endif - RETVALUE(RFAILED); + return RFAILED; } dynRegCb->bktTbl[k].size = mtGlobMemoCfg.bkt[k].blkSize; dynRegCb->bktTbl[k].blkSetRelThreshold = mtDynMemoCfg.region[i].bkt[k].blkSetRelThreshold; @@ -1801,7 +1793,7 @@ PUBLIC S16 ssdInitMem() if (pthread_mutex_init(&(regMemLeakInfo.memLock[reg]), NULL) != 0) { printf("\n mutex init failed\n"); - RETVALUE(RFAILED); + return RFAILED; } } #endif @@ -1830,7 +1822,7 @@ PUBLIC S16 ssdInitMem() free(mtCMMRegCb[k]); free(mtCMMRegCfg[k]); } - RETVALUE(RFAILED); + return RFAILED; } mtCMMRegCfg[i] = (CmMmRegCfg *)calloc(1, sizeof(CmMmRegCfg)); @@ -1847,7 +1839,7 @@ PUBLIC S16 ssdInitMem() free(mtCMMRegCfg[k]); } free(mtCMMRegCb[i]); - RETVALUE(RFAILED); + return RFAILED; } @@ -1892,7 +1884,7 @@ PUBLIC S16 ssdInitMem() } free(mtCMMRegCb[i]); free(mtCMMRegCfg[i]); - RETVALUE(RFAILED); + return RFAILED; } @@ -1925,7 +1917,7 @@ PUBLIC S16 ssdInitMem() free(mtCMMRegCfg[i]->vAddr); free(mtCMMRegCb[i]); free(mtCMMRegCfg[i]); - RETVALUE(RFAILED); + return RFAILED; } @@ -1946,7 +1938,7 @@ PUBLIC S16 ssdInitMem() free(mtCMMRegCfg[i]->vAddr); free(mtCMMRegCb[i]); free(mtCMMRegCfg[i]); - RETVALUE(RFAILED); + return RFAILED; } } } @@ -1956,7 +1948,7 @@ PUBLIC S16 ssdInitMem() #endif /* SS_MEM_LEAK_STS */ - RETVALUE(ROK); + return ROK; } @@ -2043,7 +2035,7 @@ PUBLIC S16 ssdInitTsk() osCp.sTskTbl[tskInd].dep.lwpId = 0; } #endif /* SS_MULTICORE_SUPPORT || SS_AFFINITY_SUPPORT */ - RETVALUE(ROK); + return ROK; } @@ -2120,7 +2112,7 @@ PUBLIC S16 ssdInitDrvr() */ if (pipe(osCp.dep.isFildes) != 0) { - RETVALUE(RFAILED); + return RFAILED; } #ifndef L2_L3_SPLIT @@ -2135,7 +2127,7 @@ PUBLIC S16 ssdInitDrvr() /* mt020.201 - Addition for destroying thread attribute object attr */ pthread_attr_destroy(&attr); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -2152,7 +2144,7 @@ PUBLIC S16 ssdInitDrvr() pthread_attr_destroy(&attr); #endif - RETVALUE(ROK); + return ROK; } @@ -2245,7 +2237,7 @@ PUBLIC S16 ssdInitTmr() sTsk = ssdAddTmrSTsk(); if(!sTsk) { - RETVALUE(RFAILED); + return RFAILED; } #endif /* SS_MULTICORE_SUPPORT */ /* create the timer handler thread */ @@ -2274,7 +2266,7 @@ PUBLIC S16 ssdInitTmr() /* mt020.201 - Addition for destroying thread attribute object attr */ pthread_attr_destroy(&attr); - RETVALUE(RFAILED); + return RFAILED; } #ifdef SS_THR_REG_MAP @@ -2290,7 +2282,7 @@ PUBLIC S16 ssdInitTmr() pthread_attr_destroy(&attr); - RETVALUE(ROK); + return ROK; } @@ -2412,7 +2404,7 @@ PUBLIC S16 ssdInitLog() if ((tcgetattr(fd, &tio)) != 0) { printf("Error: disable canonical input processing\n"); - RETVALUE(RFAILED); + return RFAILED; } tio.c_lflag &= ~ICANON; @@ -2421,7 +2413,7 @@ PUBLIC S16 ssdInitLog() if ((tcsetattr(fd, TCSANOW, &tio)) != 0) { printf("Error: while tcsetattr() processing\n"); - RETVALUE(RFAILED); + return RFAILED; } #endif /* CONSTDIO */ @@ -2434,7 +2426,7 @@ PUBLIC S16 ssdInitLog() if (fcntl(fd, F_SETFL, flags) == -1) { printf("Error: while fcntl processing\n"); - RETVALUE(RFAILED); + return RFAILED; } @@ -2452,7 +2444,7 @@ PUBLIC S16 ssdInitLog() pthread_attr_destroy(&attr); printf("Error: Logging Thread creation failed \n"); - RETVALUE(RFAILED); + return RFAILED; } /* mt020.201 - Addition for destroying thread attribute object attr */ @@ -2462,7 +2454,7 @@ PUBLIC S16 ssdInitLog() #endif /* CONAVL */ - RETVALUE(ROK); + return ROK; } @@ -2528,7 +2520,7 @@ U16 port; ProcId procId = SS_WD_WDPROC; if (SAddProcIdLst(1, &procId) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } #endif /* SS_MULTIPLE_PROCS */ @@ -2613,7 +2605,7 @@ U16 port; if (SGetMsg(SS_DFLT_REGION, SS_DFLT_POOL, &mBuf) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } #ifndef SS_MULTIPLE_PROCS pst.srcProcId = SFndProcId(); @@ -2626,7 +2618,7 @@ U16 port; ssdInitWatchDgPst(&pst); SPstTsk(&pst, mBuf); - RETVALUE(ROK); + return ROK; } #ifdef ANSI @@ -2654,7 +2646,7 @@ Pst *pst; pst->srcEnt = ENTDW; /* source entity */ pst->srcInst = 0; - RETVALUE(ROK); + return ROK; } #ifdef SS_MULTIPLE_PROCS @@ -2683,7 +2675,7 @@ PUBLIC S16 ssdWatchDgActvTmr() cmPrcTmr(&osCp.wdCp.watchDgTqCp, osCp.wdCp.watchDgTs, (PFV)ssdWatchDgTmrEvt); - RETVALUE(ROK); + return ROK; } #ifdef ANSI @@ -2927,7 +2919,7 @@ U32 type; } SUnlock(&osCp.wdCp.wdLock); - RETVALUE(ret); + return (ret); } #endif /* SS_WATCHDOG */ @@ -3363,7 +3355,7 @@ char *opts; /* options */ UNUSED(argv); UNUSED(opts); - RETVALUE(EOF); + return (EOF); #else sp = 1; @@ -3372,19 +3364,19 @@ char *opts; /* options */ /*mt013.301 : Changes as per coding standards*/ if (msOptInd >= (S16) argc || argv[msOptInd][0] == '\0') { - RETVALUE(EOF); + return (EOF); } else { if (!strcmp(argv[msOptInd], "--")) { msOptInd++; - RETVALUE(EOF); + return (EOF); } else if (argv[msOptInd][0] != '-') { msOptInd++; - RETVALUE('?'); + return ('?'); } } } @@ -3398,7 +3390,7 @@ char *opts; /* options */ sp = 1; } - RETVALUE('?'); + return ('?'); } if (*++cp == ':') @@ -3409,7 +3401,7 @@ char *opts; /* options */ if (++msOptInd >= (S16) argc) { sp = 1; - RETVALUE('?'); + return ('?'); } else msOptArg = argv[msOptInd++]; @@ -3428,7 +3420,7 @@ char *opts; /* options */ } - RETVALUE(c); + return (c); #endif /* NOCMDLINE */ } @@ -3523,7 +3515,7 @@ SsTTskEntry *tTsk; /* pointer to TAPA task entry */ #if (ERRCLASS & ERRCLS_DEBUG) MTLOGERROR(ERRCLS_DEBUG, EMT001, ret, "SGetMsg() failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } mInfo = (SsMsgInfo *)mBuf->b_rptr; @@ -3560,12 +3552,12 @@ SsTTskEntry *tTsk; /* pointer to TAPA task entry */ MTLOGERROR(ERRCLS_DEBUG, EMT002, ret, "Could not write to demand queue"); #endif - RETVALUE(RFAILED); + return RFAILED; } } - RETVALUE(ROK); + return ROK; } @@ -3595,7 +3587,7 @@ SsTTskEntry *tTsk; /* pointer to TAPA task entry */ TRC0(ssdDetachTTsk); - RETVALUE(ROK); + return ROK; } @@ -3623,6 +3615,7 @@ PUBLIC S16 ssdCreateSTsk(sTsk) SsSTskEntry *sTsk; /* pointer to system task entry */ #endif { + S16 ret; pthread_attr_t attr; /* struct sched_param param_sched;*/ @@ -3649,7 +3642,7 @@ SsSTskEntry *sTsk; /* pointer to system task entry */ #endif /* SS_MULTICORE_SUPPORT */ #endif /* SS_WATCHDOG */ { - RETVALUE(ROK); + return ROK; } #endif @@ -3680,16 +3673,17 @@ 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) MTLOGERROR(ERRCLS_DEBUG, EMT004, ERRZERO, "Could not create thread"); #endif - RETVALUE(RFAILED); + return RFAILED; } #ifdef SS_THR_REG_MAP threadCreated = ssCheckAndAddMemoryRegionMap(sTsk->dep.tId, @@ -3710,7 +3704,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 */ @@ -3720,7 +3715,7 @@ SsSTskEntry *sTsk; /* pointer to system task entry */ MTLOGERROR(ERRCLS_DEBUG, EMT004, ERRZERO, "Could not create thread"); #endif - RETVALUE(RFAILED); + return RFAILED; } #ifdef SS_THR_REG_MAP threadCreated = ssCheckAndAddMemoryRegionMap(sTsk->dep.tId, @@ -3741,7 +3736,7 @@ SsSTskEntry *sTsk; /* pointer to system task entry */ /* mt020.201 - Addition for destroying thread attribute object attr */ pthread_attr_destroy(&attr); - RETVALUE(ROK); + return ROK; } @@ -3770,7 +3765,7 @@ void* arg; /* Klock work fix ccpu00148484 */ if(threadArg == NULLP) { - RETVALUE(RFAILED); + return RFAILED; } threadArg->argument = arg; threadArg->start_routine = start_routine; @@ -3793,7 +3788,7 @@ void* arg; if (((retVal = pthread_create(tid, attr, pthreadCreateHdlr, threadArg))) != 0) { - RETVALUE(retVal); + return (retVal); } #ifdef SS_THR_REG_MAP threadCreated = ssCheckAndAddMemoryRegionMap(*tid, SS_MAX_REGS - 1); @@ -3801,7 +3796,7 @@ void* arg; #endif } - RETVALUE(retVal); + return (retVal); } @@ -3875,7 +3870,7 @@ pthread_attr_t *attr #endif pthread_attr_setschedparam(attr, ¶m); - RETVALUE (ROK); + return (ROK); } /* ssdSetPthreadAttr */ @@ -3940,7 +3935,7 @@ U32 *coreId; /* the core/processor id to which the affinity i if (tskInd == SS_MAX_STSKS) { MTLOGERROR(ERRCLS_DEBUG, EMT036, ERRZERO, "Invalid system task Id\n"); - RETVALUE(RFAILED); + return RFAILED; } @@ -3953,7 +3948,7 @@ U32 *coreId; /* the core/processor id to which the affinity i #if (ERRCLASS & ERRCLS_DEBUG) MTLOGERROR(ERRCLS_DEBUG, EMT037, ERRZERO, "Could not get thread affinity\n"); #endif - RETVALUE(RFAILED); + return RFAILED; } /* end if pthread_setaffinity fails */ for (cpuInd = 0; cpuInd b_rptr; @@ -4169,11 +4164,11 @@ SsSTskEntry *sTsk; /* pointer to system task entry */ "Could not write to demand queue"); #endif - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; } /* mt023.201 - Added SThreadYield function to yield CPU @@ -4213,11 +4208,11 @@ PUBLIC S16 SThreadYield() tw.tv_sec=0; tw.tv_usec=0; - RETVALUE(select(0,0,0,0,&tw) == 0 ? ROK : RFAILED); + return (select(0,0,0,0,&tw) == 0 ? ROK : RFAILED); } #else /* other UNICes */ - RETVALUE(sleep(0) == 0 ? ROK : RFAILED); + return (sleep(0) == 0 ? ROK : RFAILED); #endif /* SS_LINUX */ @@ -4276,7 +4271,7 @@ SsTmrEntry *tmr; /* pointer to timer entry */ cmPlcCbTq(&arg); - RETVALUE(ROK); + return ROK; } @@ -4322,7 +4317,7 @@ SsTmrEntry *tmr; /* pointer to timer entry */ cmRmvCbTq(&arg); - RETVALUE(ROK); + return ROK; } @@ -4385,7 +4380,7 @@ Reason reason; /* reset reason */ /* won't reach here */ - RETVALUE(ROK); + return ROK; } @@ -4549,7 +4544,7 @@ SsDrvrTskEntry *drvrTsk; /* driver task entry */ TRC0(ssdRegDrvrTsk); - RETVALUE(ROK); + return ROK; } /* mt001.30 : Additions */ /* @@ -4579,7 +4574,7 @@ SsDrvrTskEntry *drvrTsk; /* driver task entry */ TRC0(ssdDeregDrvrTsk); - RETVALUE(ROK); + return ROK; } #endif @@ -4639,7 +4634,7 @@ SsIdx idx; if (ret != ROK) { MTLOGERROR(ERRCLS_DEBUG, EMTXXX, ERRZERO, "Could not lock system task table"); - RETVALUE(RFAILED); + return RFAILED; } SS_ACQUIRE_ALL_SEMA(&osCp.tTskTblSem, ret); if (ret != ROK) @@ -4651,11 +4646,11 @@ SsIdx idx; { #if (ERRCLASS & ERRCLS_DEBUG) MTLOGERROR(ERRCLS_DEBUG, EMTXXX, ERRZERO, "Could not Unlock system task table"); - RETVALUE(RFAILED); + return RFAILED; #endif } - RETVALUE(RFAILED); + return RFAILED; } #ifdef SS_MULTIPLE_PROCS @@ -4735,9 +4730,9 @@ SsIdx idx; #if (ERRCLASS & ERRCLS_DEBUG) MTLOGERROR(ERRCLS_DEBUG, EMTXXX, ERRZERO, "Could not Unlock system task table"); #endif - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; } //#ifndef SPLIT_RLC_DL_TASK @@ -4777,7 +4772,7 @@ Ptr tskPtr; /* pointer to task entry */ * (processes L1 msgs) */ } - RETVALUE(NULLP); + return (NULLP); } #else EXTERN Void ysMtTskHdlr(Void); @@ -4837,7 +4832,7 @@ Ptr tskPtr; /* pointer to task entry */ #endif } - RETVALUE(NULLP); + return (NULLP); } #endif /* TENB_T2K3K_SPECIFIC_CHANGES */ #endif @@ -4859,7 +4854,7 @@ void *arg; continue; pthreadCreateArg->start_routine(pthreadCreateArg->argument); - RETVALUE(ROK); + return ROK; } /* @@ -4929,7 +4924,7 @@ Ptr tskPtr; /* pointer to task entry */ } } - RETVALUE(NULLP); + return (NULLP); } @@ -4993,7 +4988,7 @@ SsSTskEntry *sTsk if (ret != ROK) { /* nothing to receive */ - RETVALUE(ROK); + return ROK; } /* if we can't lock this system task entry, return the message */ @@ -5006,7 +5001,7 @@ SsSTskEntry *sTsk "Could not lock system task entry"); #endif SPutMsg(mBuf); - RETVALUE(ROK); + return ROK; } /* mt034.201 */ @@ -5058,7 +5053,7 @@ SsSTskEntry *sTsk "Could not lock system task table"); #endif /* what to do here? */ - RETVALUE(ROK); + return ROK; } /* clean up the system task entry */ @@ -5087,7 +5082,7 @@ SsSTskEntry *sTsk /* unlock the system task table */ SUnlock(&osCp.sTskTblLock); - RETVALUE(RFAILED); + return RFAILED; /* this is a data message or a permanent task keep-alive message */ @@ -5351,7 +5346,7 @@ SsSTskEntry *sTsk SThreadYield(); #endif - RETVALUE(ROK); + return ROK; } Bool g_usettitmr; @@ -5539,7 +5534,7 @@ void *parm; /* unused */ } /* mt009.21: addition */ - RETVALUE( (Void *) NULLP); + return ( (Void *) NULLP); /* will not reach here */ } @@ -5820,7 +5815,7 @@ Ptr parm; /* unused */ if (osCp.dep.conInFp == NULLP) { /* die */ - RETVALUE(NULLP); + return (NULLP); } fd = fileno(osCp.dep.conInFp); @@ -5950,7 +5945,7 @@ Ptr tskPtr; /* pointer to task entry */ } } /* mt009.21: addition */ - RETVALUE( (Void *) NULLP); + return ( (Void *) NULLP); /* not reached */ } @@ -6093,14 +6088,14 @@ Txt *buf; /* buffer */ if (buf == NULLP) { MTLOGERROR(ERRCLS_INT_PAR, EMT022, ERRZERO, "Null pointer"); - RETVALUE(RFAILED); + return RFAILED; } #endif #ifndef XEON_SPECIFIC_CHANGES #ifdef TENB_T2K3K_SPECIFIC_CHANGES ssMemlog(buf, strlen(buf)); - RETVALUE(ROK); + return ROK; #endif #endif @@ -6128,7 +6123,7 @@ Txt *buf; /* buffer */ #endif #endif - RETVALUE(ROK); + return ROK; } /*mt010.301 */ @@ -6173,7 +6168,7 @@ PUBLIC S16 SFini() #endif pthread_exit(NULLP); - RETVALUE(0); + return (0); } /* @@ -6206,7 +6201,7 @@ REG1 DateTime *dt; /* date and time */ UNUSED(dt); - RETVALUE(ROK); + return ROK; } @@ -6254,7 +6249,7 @@ REG1 DateTime *dt; /* date and time */ if (dt == NULLP) { MTLOGERROR(ERRCLS_INT_PAR, EMT023, ERRZERO, "Null pointer"); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -6287,7 +6282,7 @@ REG1 DateTime *dt; /* date and time */ #endif #endif /*-- SS_DATETIME_USEC --*/ - RETVALUE(ROK); + return ROK; } /* @@ -6333,7 +6328,7 @@ PRIVATE U64 now; #if (ERRCLASS & ERRCLS_INT_PAR) if (et == NULLP) { - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -6356,7 +6351,7 @@ PRIVATE U64 now; *et = now; - RETVALUE(ROK); + return ROK; } @@ -6391,7 +6386,7 @@ Ticks *sysTime; /* system time */ if (sysTime == NULLP) { MTLOGERROR(ERRCLS_INT_PAR, EMT024, ERRZERO, "Null pointer"); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -6399,7 +6394,7 @@ Ticks *sysTime; /* system time */ *sysTime = osCp.dep.sysTicks; - RETVALUE(ROK); + return ROK; } /* mt021.201 - Addition of SGetRefTime function */ @@ -6455,13 +6450,13 @@ U32 *usec; if (sec == NULLP || usec == NULLP) { MTLOGERROR(ERRCLS_INT_PAR, EMT025, ERRZERO, "Null pointer"); - RETVALUE(RFAILED); + return RFAILED; } /* mt022.201 - Modification to fix compile warning */ if (refTime > (U32)(ptime.tv_sec)) { MTLOGERROR(ERRCLS_INT_PAR, EMT026, ERRZERO, "Reference time exceeds present time"); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -6472,7 +6467,7 @@ U32 *usec; *usec = ptime.tv_usec; #endif - RETVALUE(ROK); + return ROK; } @@ -6510,7 +6505,7 @@ Random *value; /* random number */ { /* mt011.21: addition */ MTLOGERROR(ERRCLS_INT_PAR, EMT028, (ErrVal)0 , "Null pointer"); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -6518,7 +6513,7 @@ Random *value; /* random number */ *value = (Random) rand_r(&osCp.dep.randSeed); - RETVALUE(ROK); + return ROK; } @@ -6547,7 +6542,7 @@ PUBLIC S16 SExitTsk() TRC1(SExitTsk); - RETVALUE(ROK); + return ROK; } @@ -6576,7 +6571,7 @@ PUBLIC S16 SExitInt() TRC1(SExitInt); - RETVALUE(ROK); + return ROK; } @@ -6609,7 +6604,7 @@ PUBLIC S16 SHoldInt() TRC1(SHoldInt); - RETVALUE(ROK); + return ROK; } @@ -6638,7 +6633,7 @@ PUBLIC S16 SRelInt() TRC1(SRelInt); - RETVALUE(ROK); + return ROK; } @@ -6668,7 +6663,7 @@ PUBLIC INLINE S16 SEnbInt() TRC1(SEnbInt); - RETVALUE(ROK); + return ROK; } @@ -6698,7 +6693,7 @@ PUBLIC INLINE S16 SDisInt() TRC1(SDisInt); - RETVALUE(ROK); + return ROK; } @@ -6735,7 +6730,7 @@ PIF *vectFnct; /* vector function */ UNUSED(vectFnct); - RETVALUE(ROK); + return ROK; } @@ -6772,7 +6767,7 @@ PIF vectFnct; /* vector function */ UNUSED(vectFnct); - RETVALUE(ROK); + return ROK; } /* mt028.201: modification: multiple procs support related changes */ @@ -6819,7 +6814,7 @@ Inst *inst; /* instance */ if (ent == NULLP || inst == NULLP) { MTLOGERROR(ERRCLS_INT_PAR, EMT029, ERRZERO, "Null pointer"); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -6833,7 +6828,7 @@ Inst *inst; /* instance */ ret = SLock(&osCp.sTskTblLock); if (ret != ROK) { - RETVALUE(RFAILED); + return RFAILED; } for (i = 0; i < SS_MAX_STSKS; i++) { @@ -6851,7 +6846,7 @@ Inst *inst; /* instance */ SUnlock(&osCp.sTskTblLock); - RETVALUE(ret == ROK ? ROK : RFAILED); + return (ret == ROK ? ROK : RFAILED); } @@ -6894,7 +6889,7 @@ Inst inst; /* instance */ if (ent >= ENTNC || inst >= INSTNC) { MTLOGERROR(ERRCLS_INT_PAR, EMT030, ERRZERO, "Invalid entity/instance"); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -6908,7 +6903,7 @@ Inst inst; /* instance */ ret = SLock(&osCp.sTskTblLock); if (ret != ROK) { - RETVALUE(RFAILED); + return RFAILED; } for (i = 0; i < SS_MAX_STSKS; i++) { @@ -6926,7 +6921,7 @@ Inst inst; /* instance */ SUnlock(&osCp.sTskTblLock); - RETVALUE(ret == ROK ? ROK : RFAILED); + return (ret == ROK ? ROK : RFAILED); } #endif /* SS_MULTIPLE_PROCS */ @@ -6969,7 +6964,7 @@ Bool flag; /* flag */ if (id >= SS_MAX_DRVRTSKS || osCp.drvrTskTbl[id].used == FALSE) { MTLOGERROR(ERRCLS_INT_PAR, EMT031, id, "Invalid instance"); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -6979,11 +6974,11 @@ Bool flag; /* flag */ if (write(osCp.dep.isFildes[1], &isFlag, sizeof(isFlag)) != sizeof(isFlag)) { - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; } #endif /* SS_DRVR_SUPPORT */ @@ -7051,7 +7046,7 @@ PUBLIC S16 SGlobMemInfoShow() sprintf(prntBuf, "--------------------------------------------------------------\n"); SDisplay(0, prntBuf); - RETVALUE(ROK); + return ROK; } #endif /* SS_LOCKLESS_MEMORY */ @@ -7066,9 +7061,9 @@ Bool IsMemoryThresholdHit(Region reg, Pool pool) pool, mtCMMRegCb[reg]->bktTbl[pool].numAlloc, mtCMMRegCb[reg]->bktTbl[pool].numBlks); - RETVALUE(TRUE); + return (TRUE); } - RETVALUE(FALSE); + return (FALSE); } */ @@ -7126,7 +7121,7 @@ U32 *availmem; if (region > (SS_MAX_REGS-1) ) { MTLOGERROR(ERRCLS_INT_PAR, EMT032, ERRZERO, "Invalid Region"); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -7206,7 +7201,7 @@ U32 *availmem; SDisplay(0, prntBuf); #endif - RETVALUE(ROK); + return ROK; } #ifdef XEON_SPECIFIC_CHANGES #define SSI_MAX_BKT_THRESHOLD 6 @@ -7274,7 +7269,7 @@ U8 maxBkt; memStatus = 2; } } - RETVALUE(memStatus); + return (memStatus); } #endif /* mt033.201 - addition of API to return the memory statistical data */ @@ -7314,7 +7309,7 @@ SsMemDbgInfo *dbgInfo; if (region >= mtMemoCfg.numRegions ) { MTLOGERROR(ERRCLS_INT_PAR, EMT033, ERRZERO, "Invalid Region"); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -7349,7 +7344,7 @@ SsMemDbgInfo *dbgInfo; dbgInfo->numFragBlk = mtCMMRegCb[region]->heapCb.numFragBlk; #endif - RETVALUE(ROK); + return ROK; } #ifdef ANSI @@ -7369,7 +7364,7 @@ U8 *numPool; /* Send number of Pools available */ *numPool = cfgRegInfo[0].numPools; - RETVALUE(ROK); + return ROK; } /* mt033.201 - addition of APIs to print the memory statistical data @@ -7418,7 +7413,7 @@ U8 typeFlag; if (region >= mtMemoCfg.numRegions ) { MTLOGERROR(ERRCLS_INT_PAR, EMT034, ERRZERO, "Invalid Region"); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -7483,7 +7478,7 @@ U8 typeFlag; else if (typeFlag == SS_MEM_BLK_SIZE_PROFILE) { /* Bucket Memory allocation Statistics */ - RETVALUE(SPrintRegMemStats(region)); + return (SPrintRegMemStats(region)); } else { @@ -7492,7 +7487,7 @@ U8 typeFlag; SDisplay(0, prntBuf); } - RETVALUE(ROK); + return ROK; } /* @@ -7599,7 +7594,7 @@ Region region; sprintf(prntBuf, "\n"); SDisplay(0, prntBuf); - RETVALUE(ROK); + return ROK; } /* @@ -7692,7 +7687,7 @@ Region region; if (region >= mtMemoCfg.numRegions ) { MTLOGERROR(ERRCLS_INT_PAR, EMT035, ERRZERO, "Invalid Region"); - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -7830,7 +7825,7 @@ Region region; * we cannot rely on this size. So it is better to stop here unless there * exists any other mechanism(?) to know the offset to next block. */ - RETVALUE(ROK); + return ROK; } /*mt009.301 Fixed 64BIT compilation warnings*/ @@ -7881,7 +7876,7 @@ Region region; } - RETVALUE(ROK); + return ROK; } #endif /* SSI_DEBUG_LEVEL1 */ @@ -7954,7 +7949,7 @@ S8 *ts; sprintf(ts, "%s.%03ld", time_string, microseconds); #endif - RETVALUE(ROK); + return ROK; } /*-- mt037.201 : Added new API for SGetSystemTsk --*/ @@ -7982,7 +7977,7 @@ PUBLIC U32 SGetSystemTsk() { TRC1(SGetSystemTskS); - RETVALUE(pthread_self()); + return (pthread_self()); } /* end of SGetSystemTsk */ @@ -8022,7 +8017,7 @@ PRIVATE SsSTskEntry* ssdAddTmrSTsk() "Could not lock system task table"); #endif - RETVALUE(sTsk); + return (sTsk); } /* check count of system tasks */ @@ -8034,7 +8029,7 @@ PRIVATE SsSTskEntry* ssdAddTmrSTsk() #if (ERRCLASS & ERRCLS_DEBUG) MTLOGERROR(ERRCLS_DEBUG, EMT040, ERRZERO, "Could not give the Semaphore"); - RETVALUE(sTsk); + return (sTsk); #endif } @@ -8042,7 +8037,7 @@ PRIVATE SsSTskEntry* ssdAddTmrSTsk() MTLOGERROR(ERRCLS_ADD_RES, EMT041, ERRZERO, "Too many system tasks"); #endif - RETVALUE(sTsk); + return (sTsk); } @@ -8061,7 +8056,7 @@ PRIVATE SsSTskEntry* ssdAddTmrSTsk() #if (ERRCLASS & ERRCLS_DEBUG) MTLOGERROR(ERRCLS_DEBUG, EMT042, ERRZERO, "Could not give the Semaphore"); - RETVALUE(NULLP); + return (NULLP); #endif } @@ -8070,7 +8065,7 @@ PRIVATE SsSTskEntry* ssdAddTmrSTsk() "Could not initialize demand queue"); #endif - RETVALUE(NULLP); + return (NULLP); } /* initialize the system task entry lock */ @@ -8083,7 +8078,7 @@ PRIVATE SsSTskEntry* ssdAddTmrSTsk() #if (ERRCLASS & ERRCLS_DEBUG) MTLOGERROR(ERRCLS_DEBUG, EMT044, ERRZERO, "Could not give the Semaphore"); - RETVALUE(NULLP); + return (NULLP); #endif } @@ -8092,7 +8087,7 @@ PRIVATE SsSTskEntry* ssdAddTmrSTsk() "Could not initialize system task entry lock"); #endif - RETVALUE(NULLP); + return (NULLP); } @@ -8110,11 +8105,11 @@ PRIVATE SsSTskEntry* ssdAddTmrSTsk() #if (ERRCLASS & ERRCLS_DEBUG) MTLOGERROR(ERRCLS_DEBUG, EMT046, ERRZERO, "Could not give the Semaphore"); - RETVALUE(NULLP); + return (NULLP); #endif } - RETVALUE(sTsk); + return (sTsk); } #endif /* SS_MULTICORE_SUPPORT */ /* mt003.301 Readwrite lock and recursive mutex additions */ @@ -8162,7 +8157,7 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdInitLockNew(): Initialization of read write lock failed,Error# retVal %d\n", retVal); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } break; } @@ -8176,7 +8171,7 @@ U8 lockType; { sprintf(prntBuf,"\n ssdInitLockNew(): mutexattr init failed,Error# %d \n",retVal); SPrint(prntBuf); - RETVALUE(RFAILED); + return RFAILED; } #ifdef SS_LINUX retVal = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); @@ -8188,7 +8183,7 @@ U8 lockType; sprintf(prntBuf,"\n ssdInitLockNew(): mutexattr settype failed,Error# %d \n",retVal); pthread_mutexattr_destroy(&attr); SPrint(prntBuf); - RETVALUE(RFAILED); + return RFAILED; } retVal = pthread_mutex_init((pthread_mutex_t *)&(lockId->l.recurLock), &attr); if(retVal != 0) @@ -8196,7 +8191,7 @@ U8 lockType; sprintf(prntBuf,"\n ssdInitLockNew(): mutex init failed,Error# %d \n",retVal); pthread_mutexattr_destroy(&attr); SPrint(prntBuf); - RETVALUE(RFAILED); + return RFAILED; } break; } @@ -8205,10 +8200,10 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdInitLockNew(): Invalid lock type %d\n", lockType); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } } - RETVALUE(ROK); + return ROK; } /* * @@ -8250,7 +8245,7 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the read lock,Error# %d\n", retVal); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } break; } @@ -8260,7 +8255,7 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the write lock,Error# %d\n", retVal); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } break; } @@ -8270,7 +8265,7 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the read lock,Error# %d\n", retVal); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } break; } @@ -8280,7 +8275,7 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the read lock,Error# %d\n", retVal); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } break; } @@ -8292,7 +8287,7 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdLockNew(): Failed to aquire the recursive mutex,Error# %d\n", retVal); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } break; } @@ -8301,11 +8296,11 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdLockNew(): Invalid lock type %d\n", lockType); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } } - RETVALUE(ROK); + return ROK; } @@ -8349,7 +8344,7 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdUnLockNew(): Failed to unlock the lock,Error# %d\n", retVal); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } break; } @@ -8361,7 +8356,7 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdUnLockNew(): Failed to aquire the recursive mutex,Error# %d\n", retVal); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } break; } @@ -8370,10 +8365,10 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdUnlockNew(): Invalid lock type %d\n", lockType); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } } - RETVALUE(ROK); + return ROK; } /* @@ -8415,7 +8410,7 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdDestroyLockNew(): Failed to destroy the lock,Error# %d\n", retVal); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } break; } @@ -8427,7 +8422,7 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdDestroyLockNew(): Failed to destroy the mutex,Error# %d\n", retVal); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } break; } @@ -8436,10 +8431,10 @@ U8 lockType; { sprintf(prntBuf, "\n\n ssdDestroyLockNew(): Invalid lock type %d\n", lockType); SDisplay(0, prntBuf); - RETVALUE(RFAILED); + return RFAILED; } } - RETVALUE(ROK); + return ROK; } #endif /* SS_LOCK_SUPPORT */ @@ -8488,12 +8483,12 @@ PUBLIC S16 ssInitRcvWork() { pthread_attr_destroy(&attr); - RETVALUE(RFAILED); + return RFAILED; } pthread_attr_destroy(&attr); - RETVALUE(ROK); + return ROK; }/* ssInitRcvWork */ @@ -8711,7 +8706,7 @@ Region region /* Region associated with thread */ exit(1); } createdThreadIds[createdThreads++] = threadId; - RETVALUE(FALSE); + return (FALSE); } /* If we found free mapping table entry, place the region and send pthread_cancel * for all the thread Ids which are created before this @@ -8731,7 +8726,7 @@ Region region /* Region associated with thread */ } createdThreads = 0; - RETVALUE(TRUE); + return (TRUE); } /* ssCheckAndAddMemoryRegionMap */ @@ -8780,14 +8775,14 @@ pthread_t threadId /* Thread Id of system task */ #else printf("Invalid Thread ID (%d)\n", (U32)threadId); #endif - RETVALUE(RFAILED); + return RFAILED; } /* If we found free mapping table entry, place the region and send pthread_cancel * for all the thread Ids which are created before this */ osCp.threadMemoryRegionMap[((threadId >> SS_MEM_THREAD_ID_SHIFT) % SS_MAX_THREAD_REGION_MAP)] = SS_INVALID_THREAD_REG_MAP; - RETVALUE(ROK); + return ROK; } /* ssCheckAndAddMemoryRegionMap */ @@ -8822,7 +8817,7 @@ U32 taskId; #ifdef MSPD_MLOG_NEW *startTime = GetTIMETICK(); #endif - RETVALUE(ROK); + return ROK; } /* @@ -8886,7 +8881,7 @@ U32 taskId; #endif break; } - RETVALUE(ROK); + return ROK; } #else #ifdef ANSI @@ -8902,7 +8897,7 @@ U32 taskId; #endif { *startTime = 0; - RETVALUE(ROK); + return ROK; } #ifdef ANSI @@ -8917,7 +8912,7 @@ VOLATILE U32 startTime; U32 taskId; #endif { - RETVALUE(ROK); + return ROK; } #endif /*#ifdef SS_TSKLOG_ENABLE */ @@ -9045,7 +9040,7 @@ U8 idx; "Could not lock system task table"); #endif - RETVALUE(sTsk); + return (sTsk); } /* initialize the system task entry with the information we have */ @@ -9070,7 +9065,7 @@ U8 idx; #if (ERRCLASS & ERRCLS_DEBUG) MTLOGERROR(ERRCLS_DEBUG, EMT042, ERRZERO, "Could not give the Semaphore"); - RETVALUE(NULLP); + return (NULLP); #endif } @@ -9079,7 +9074,7 @@ U8 idx; "Could not initialize demand queue"); #endif - RETVALUE(NULLP); + return (NULLP); } /* initialize the system task entry lock */ @@ -9092,7 +9087,7 @@ U8 idx; #if (ERRCLASS & ERRCLS_DEBUG) MTLOGERROR(ERRCLS_DEBUG, EMT044, ERRZERO, "Could not give the Semaphore"); - RETVALUE(NULLP); + return (NULLP); #endif } @@ -9101,7 +9096,7 @@ U8 idx; "Could not initialize system task entry lock"); #endif - RETVALUE(NULLP); + return (NULLP); } @@ -9117,11 +9112,11 @@ U8 idx; #if (ERRCLASS & ERRCLS_DEBUG) MTLOGERROR(ERRCLS_DEBUG, EMT046, ERRZERO, "Could not give the Semaphore"); - RETVALUE(NULLP); + return (NULLP); #endif } - RETVALUE(sTsk); + return (sTsk); } #endif /* SS_MULTICORE_SUPPORT */ @@ -9171,7 +9166,7 @@ PUBLIC S16 ssdReInitTmr() MTLOGERROR(ERRCLS_DEBUG, EMT046, ERRZERO, "Could not give the Semaphore"); #endif - RETVALUE(RFAILED); + return RFAILED; } #endif @@ -9182,7 +9177,7 @@ PUBLIC S16 ssdReInitTmr() sTsk = ssdReAddTmrSTsk(0); if(!sTsk) { - RETVALUE(RFAILED); + return RFAILED; } #endif /* SS_MULTICORE_SUPPORT */ /* create the timer handler thread */ @@ -9212,7 +9207,7 @@ PUBLIC S16 ssdReInitTmr() /* mt020.201 - Addition for destroying thread attribute object attr */ pthread_attr_destroy(&attr); - RETVALUE(RFAILED); + return RFAILED; } #ifdef SS_THR_REG_MAP @@ -9227,7 +9222,7 @@ PUBLIC S16 ssdReInitTmr() /* mt020.201 - Addition for destroying thread attribute object attr */ pthread_attr_destroy(&attr); sem_post(&osCp.dep.ssStarted); - RETVALUE(ROK); + return ROK; } /**********************************************************************