J-Release Documentation
[o-du/l2.git] / src / mt / ss_gen.c
index c50595c..98c5c76 100644 (file)
@@ -114,10 +114,15 @@ volatile SsOs     osCp;           /* common OS control point */
 #else
 SsOs     osCp;           /* common OS control point */
 #endif
+/* for SGetOpt() */
+extern S16 msOptInd;
+extern S8  *msOptArg;
+extern Txt **msArgv;
+extern S16 msArgc;
 
  
-Cntr     cfgNumRegs;
-SsRegCfg cfgRegInfo[SS_MAX_REGS];
+extern Cntr     cfgNumRegs;
+extern SsRegCfg cfgRegInfo[SS_MAX_REGS];
 
 \f
 /* ss029.103: modification: multiple procId related changes */ 
@@ -169,7 +174,7 @@ Void mtSigSegvHndlr()
 {
    int i;
 
-   printf("Backtrace for thread Id (%lu) total threads = %d\n", (unsigned long) pthread_self(), osCp.numSTsks);   
+   printf("\nBacktrace for thread Id (%lu) total threads = %d\n", (unsigned long) pthread_self(), osCp.numSTsks);   
    ysPrntBkTrace();
    for(i = 0; i < osCp.numSTsks; i++)
    {
@@ -185,7 +190,7 @@ Void mtSigSegvHndlr()
 
 Void mtSigUsr2Hndlr()
 {
-   printf("Backtrace for thread Id (%lu) cause:SIGUSR2(%d)\n",(unsigned long) pthread_self(),SIGUSR2);   
+   printf("\nBacktrace for thread Id (%lu) cause:SIGUSR2(%d)\n",(unsigned long) pthread_self(),SIGUSR2);   
 
    pthread_mutex_lock(&dumpingLock);  
    ysPrntBkTrace();
@@ -1900,7 +1905,7 @@ uint32_t GetNextFreeIdx(StaticMemAllocInfo * memAllocInfo)
 
    if(newNextFreeIdx == 0 || newNextFreeIdx >= MAX_MEM_ALLOCATIONS)
    {
-      printf("Something wrong in GetNextFreeIdx newNextIdx = %ld\n",newNextFreeIdx);
+      printf("\nSomething wrong in GetNextFreeIdx newNextIdx = %ld\n",newNextFreeIdx);
    }
 
    memAllocInfo->nextFreeIdx = newNextFreeIdx;
@@ -1925,7 +1930,7 @@ void FreeIdx(uint8_t* ptr, uint32_t idx, StaticMemAllocInfo* memAllocInfo,uint32
 CRASH_ENB
 #endif   
       
-      printf("Freeing wrong ptr stored = %p trying to free %p freeing size (%ld)"
+      printf("\nFreeing wrong ptr stored = %p trying to free %p freeing size (%ld)"
             "allocated size(%ld) from %s:%ld\n",
               memAllocInfo->allocations[idx].ptr, 
               ptr,
@@ -1933,8 +1938,8 @@ CRASH_ENB
               memAllocInfo->allocations[idx].size,
               file,
               line);
-      printf("Allocation was done from %s:%ld\n",memAllocInfo->allocations[idx].file, memAllocInfo->allocations[idx].lineNo);
-      printf("***********************************************************\n");
+      printf("\nAllocation was done from %s:%ld\n",memAllocInfo->allocations[idx].file, memAllocInfo->allocations[idx].lineNo);
+      printf("\n***********************************************************\n");
       CRASH_ENB
    }
 
@@ -1974,7 +1979,7 @@ void InitializeForStaticMemLeak()
          StaticMemLeakFileArr[3] == NULL)
    {
       int *p = 0;
-      printf("Could not open files for Static Mem Leak detection logging :( crashing...\n");
+      printf("\nCould not open files for Static Mem Leak detection logging :( crashing...\n");
       *p = 100;
    }