Modifying commiter information in INFO.yaml
[o-du/l2.git] / src / mt / ss_timer.c
index b532e3e..ccce3ce 100644 (file)
@@ -78,7 +78,7 @@
  * functions are enclosed in a union. 
  */
 #ifndef SS_MULTIPLE_PROCS
-PRIVATE S16 STmrRegHndlr ARGS((
+static S16 STmrRegHndlr ARGS((
          Ent ent,
          Inst inst,
          S16 period,
@@ -89,7 +89,7 @@ PRIVATE S16 STmrRegHndlr ARGS((
  * handled mtFlag in existing timer handlers. 
  */
 #else /* SS_MULTIPLE_PROCS */
-PRIVATE S16 STmrRegHndlr ARGS((
+static S16 STmrRegHndlr ARGS((
          ProcId proc,
          Ent ent,
          Inst inst,
@@ -101,7 +101,7 @@ PRIVATE S16 STmrRegHndlr ARGS((
 
 /* ss041.103 Declaration for STmrDeregHndlr */
 #ifndef SS_MULTIPLE_PROCS
-PRIVATE S16 STmrDeregHndlr ARGS((
+static S16 STmrDeregHndlr ARGS((
          Ent ent,
          Inst inst,
          S16 period,
@@ -112,7 +112,7 @@ PRIVATE S16 STmrDeregHndlr ARGS((
  * handled mtFlag in existing timer handlers.
  */
 #else /* SS_MULTIPLE_PROCS */
-PRIVATE S16 STmrDeregHndlr ARGS((
+static S16 STmrDeregHndlr ARGS((
          ProcId proc,
          Ent ent,
          Inst inst,
@@ -145,7 +145,6 @@ PRIVATE S16 STmrDeregHndlr ARGS((
 */
 /* ss029.103: addition: procId added and timer function type modified */ 
 #ifndef SS_MULTIPLE_PROCS
-#ifdef ANSI
 S16 SRegCfgTmr
 (
 Ent ent,                    /* entity */
@@ -154,21 +153,11 @@ S16 period,                 /* period */
 S16 units,                  /* period units */
 PFS16 tmrFnct               /* timer function, typically SActvTmr */
 )
-#else
-S16 SRegCfgTmr(ent, inst, period, units, tmrFnct)
-Ent ent;                    /* entity */
-Inst inst;                  /* instance */
-S16 period;                 /* period */
-S16 units;                  /* period units*/
-PFS16 tmrFnct;              /* timer function, typically SActvTmr */
-#endif
 {
-       S16 ret;
-       /* ss015.301 - Enclosed all timer activation functions in a union. */
-       SsTmrActvFn ssTmrActvFn;
-       /* ss041.103 - Moved handling to STmrRegHndlr */
-
-   TRC1(SRegCfgTmr);
+   S16 ret;
+   /* ss015.301 - Enclosed all timer activation functions in a union. */
+   SsTmrActvFn ssTmrActvFn;
+   /* ss041.103 - Moved handling to STmrRegHndlr */
 
    ssTmrActvFn.mtFlag = FALSE;
    ssTmrActvFn.actvFnc.tmrActvFn = tmrFnct;
@@ -179,7 +168,6 @@ PFS16 tmrFnct;              /* timer function, typically SActvTmr */
 
 #else /* SS_MULTIPLE_PROCS */
 
-#ifdef ANSI
 S16 SRegCfgTmr
 (
 ProcId proc,                /* processor */
@@ -189,24 +177,12 @@ S16 period,                 /* period */
 S16 units,                  /* period units */
 PAIFTMRS16 tmrFnct               /* timer function, typically SActvTmr */
 )
-#else
-S16 SRegCfgTmr(proc, ent, inst, period, units, tmrFnct)
-ProcId proc;                /* processor */
-Ent ent;                    /* entity */
-Inst inst;                  /* instance */
-S16 period;                 /* period */
-S16 units;                  /* period units*/
-PAIFTMRS16 tmrFnct;              /* timer function, typically SActvTmr */
-#endif
-
 {
    S16 ret;
    /* ss015.301 - Enclosed all timer activation functions in a union. */
    SsTmrActvFn ssTmrActvFn;
    /* ss041.103 - Moved handling to STmrRegHndlr */
 
-   TRC1(SRegCfgTmr);
-
    ssTmrActvFn.mtFlag = FALSE;
    ssTmrActvFn.actvFnc.tmrActvFn = tmrFnct;
    ret = STmrRegHndlr(proc, ent, inst, period, units, ssTmrActvFn);
@@ -239,7 +215,6 @@ PAIFTMRS16 tmrFnct;              /* timer function, typically SActvTmr */
 *       File:  ss_timer.c
 *
 */
-#ifdef ANSI
 S16 SRegCfgTmrMt
 (
 Ent ent,                    /* entity */
@@ -248,21 +223,11 @@ S16 period,                 /* period */
 S16 units,                  /* period units */
 PAIFTMRS16 tmrFnctMt        /* timer function, typically SActvTmr */
 )
-#else
-S16 SRegCfgTmrMt(ent, inst, period, units, tmrFnctMt)
-Ent ent;                    /* entity */
-Inst inst;                  /* instance */
-S16 period;                 /* period */
-S16 units;                  /* period units*/
-PAIFTMRS16 tmrFnctMt;       /* timer function, typically SActvTmr */
-#endif
 {
    S16 ret;
    /* ss015.301 - Enclosed all timer activation functions in a union. */
    SsTmrActvFn ssTmrActvFn;
 
-   TRC1(SRegCfgTmrMt);
-
    ssTmrActvFn.actvFnc.tmrActvFnMt = tmrFnctMt;
    ssTmrActvFn.mtFlag = TRUE;
    ret = STmrRegHndlr(ent, inst, period, units, ssTmrActvFn);
@@ -297,8 +262,7 @@ PAIFTMRS16 tmrFnctMt;       /* timer function, typically SActvTmr */
 
 #ifndef SS_MULTIPLE_PROCS
 
-#ifdef ANSI
-PRIVATE S16 STmrRegHndlr
+static S16 STmrRegHndlr
 (
 Ent ent,                    /* entity */
 Inst inst,                  /* instance */
@@ -306,22 +270,13 @@ S16 period,                 /* period */
 S16 units,                  /* period units */
 SsTmrActvFn ssTmrActvFn               /* timer function, typically SActvTmr */
 )
-#else
-PRIVATE S16 STmrRegHndlr(ent, inst, period, units, ssTmrActvFn)
-Ent ent;                    /* entity */
-Inst inst;                  /* instance */
-S16 period;                 /* period */
-S16 units;                  /* period units*/
-SsTmrActvFn ssTmrActvFn;              /* timer function, typically SActvTmr */
-#endif
 /* ss015.301: Removed the timer handler prototypes guarded
  * under SS_MT_TMR and handled mtFlag in existing timer handlers.
  */
 
 #else /* SS_MULTIPLE_PROCS */
 
-#ifdef ANSI
-PRIVATE S16 STmrRegHndlr
+static S16 STmrRegHndlr
 (
 ProcId proc,                /* processor */
 Ent ent,                    /* entity */
@@ -330,31 +285,19 @@ S16 period,                 /* period */
 S16 units,                  /* period units */
 SsTmrActvFn ssTmrActvFn     /* timer function */
 )
-#else
-PRIVATE S16 STmrRegHndlr(proc, ent, inst, period, units, ssTmrActvFn)
-ProcId proc;                /* processor */
-Ent ent;                    /* entity */
-Inst inst;                  /* instance */
-S16 period;                 /* period */
-S16 units;                  /* period units*/
-SsTmrActvFn ssTmrActvFn;         /* timer function */
-#endif
-
 #endif /* SS_MULTIPLE_PROCS */
 {
 #if (ERRCLASS & ERRCLS_INT_PAR)
-   U8 i;
+   uint8_t i;
 #endif
    S16 ret;
    SsTmrEntry *tmr;
 #ifdef SS_MULTIPLE_PROCS
 #if (ERRCLASS & ERRCLS_INT_PAR)
-   U16 procIdIdx;
+   uint16_t procIdIdx;
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 #endif /* SS_MULTPLE_PROCS */
 
-   TRC1(STmrRegHndlr);
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
 
 #ifdef SS_MULTIPLE_PROCS
@@ -517,7 +460,7 @@ SsTmrActvFn ssTmrActvFn;         /* timer function */
 #else
             && (osCp.tmrTbl[i].ssTmrActvFn.actvFnc.tmrActvFn == ssTmrActvFn.actvFnc.tmrActvFn)
 #endif
-            && (osCp.tmrTbl[i].interval == (U32) ((period * SS_TICKS_SEC) / units)))
+            && (osCp.tmrTbl[i].interval == (uint32_t) ((period * SS_TICKS_SEC) / units)))
       {
          /* is this timer in use ? (unexpired) */
          if (osCp.tmrTbl[i].used == TRUE)
@@ -545,7 +488,7 @@ SsTmrActvFn ssTmrActvFn;         /* timer function */
 #endif /* SS_MULTIPLE_PROCS */
    tmr->ownerEnt  = ent;
    tmr->ownerInst = inst;
-   tmr->interval  = (U32) ((period * SS_TICKS_SEC) / units);
+   tmr->interval  = (uint32_t) ((period * SS_TICKS_SEC) / units);
    tmr->ssTmrActvFn.mtFlag = ssTmrActvFn.mtFlag;
 
    /* ss041.103 */
@@ -624,7 +567,6 @@ SsTmrActvFn ssTmrActvFn;         /* timer function */
 /* ss029.103: addition: procId added and timer function type modified */ 
 #ifndef SS_MULTIPLE_PROCS
 
-#ifdef ANSI
 S16 SDeregCfgTmr
 (
 Ent ent,                    /* entity */
@@ -633,22 +575,12 @@ S16 period,                 /* period */
 S16 units,                  /* period units */
 PFS16 tmrFnct               /* timer function */
 )
-#else
-S16 SDeregCfgTmr(ent, inst, period, units, tmrFnct)
-Ent ent;                    /* entity */
-Inst inst;                  /* instance */
-S16 period;                 /* period */
-S16 units;                  /* period units*/
-PFS16 tmrFnct;              /* timer function */
-#endif
 {
    S16 ret;
    /* ss015.301 Enclosed all timer activation functions in a union. */
    SsTmrActvFn ssTmrActvFn;
    /* ss041.103 - Moved handling to STmrDeregHndlr */
 
-   TRC1(SDeregCfgTmr);
-
    ssTmrActvFn.mtFlag = FALSE;
    ssTmrActvFn.actvFnc.tmrActvFn = tmrFnct;  
    ret = STmrDeregHndlr(ent, inst, period, units, ssTmrActvFn);
@@ -658,7 +590,6 @@ PFS16 tmrFnct;              /* timer function */
 
 #else /* SS_MULTIPLE_PROCS */
 
-#ifdef ANSI
 S16 SDeregCfgTmr
 (
 ProcId proc,                /* processor */
@@ -668,15 +599,6 @@ S16 period,                 /* period */
 S16 units,                  /* period units */
 PAIFTMRS16 tmrFnct               /* timer function */
 )
-#else
-S16 SDeregCfgTmr(proc, ent, inst, period, units, tmrFnct)
-ProcId proc;                /* processor */
-Ent ent;                    /* entity */
-Inst inst;                  /* instance */
-S16 period;                 /* period */
-S16 units;                  /* period units*/
-PAIFTMRS16 tmrFnct;              /* timer function */
-#endif
 {
    S16 ret;
    /* ss015.301 Enclosed all timer activation functions in a union. */ 
@@ -684,8 +606,6 @@ PAIFTMRS16 tmrFnct;              /* timer function */
 
    /* ss041.103 - Moved handling to STmrDeregHndlr */
 
-   TRC1(SDeregCfgTmr);
-
    ssTmrActvFn.mtFlag = FALSE;
    ssTmrActvFn.actvFnc.tmrActvFn = tmrFnct;  
    ret = STmrDeregHndlr(proc, ent, inst, period, units, ssTmrActvFn);
@@ -713,7 +633,6 @@ PAIFTMRS16 tmrFnct;              /* timer function */
 *       File:  ss_timer.c
 *
 */
-#ifdef ANSI
 S16 SDeregCfgTmrMt
 (
 Ent ent,                    /* entity */
@@ -722,21 +641,11 @@ S16 period,                 /* period */
 S16 units,                  /* period units */
 PAIFTMRS16 tmrFnctMt               /* timer function */
 )
-#else
-S16 SDeregCfgTmrMt(ent, inst, period, units, tmrFnctMt)
-Ent ent;                    /* entity */
-Inst inst;                  /* instance */
-S16 period;                 /* period */
-S16 units;                  /* period units*/
-PAIFTMRS16 tmrFnctMt;              /* timer function */
-#endif
 {
    S16 ret;
    /* ss015.301 Enclosed all timer activation functions in a union. */
    SsTmrActvFn ssTmrActvFn;
 
-   TRC1(SDeregCfgTmrMt);
-
    ssTmrActvFn.actvFnc.tmrActvFnMt = tmrFnctMt;
    ssTmrActvFn.mtFlag = TRUE;
 
@@ -769,8 +678,7 @@ PAIFTMRS16 tmrFnctMt;              /* timer function */
  * functions are enclosed in a union.
  */
 #ifndef SS_MULTIPLE_PROCS
-#ifdef ANSI
-PRIVATE S16 STmrDeregHndlr
+static S16 STmrDeregHndlr
 (
 Ent ent,                    /* entity */
 Inst inst,                  /* instance */
@@ -778,25 +686,13 @@ S16 period,                 /* period */
 S16 units,                  /* period units */
 SsTmrActvFn ssTmrActvFn           /* timer function */
 )
-#else
-/* ss017.301: Modified the prototype of STmrDeregHndlr for Non-ANSI
- * compilation.
- */
-PRIVATE S16 STmrDeregHndlr(ent, inst, period, units, ssTmrActvFn)
-Ent ent;                    /* entity */
-Inst inst;                  /* instance */
-S16 period;                 /* period */
-S16 units;                  /* period units*/
-SsTmrActvFn ssTmrActvFn;          /* timer function */
-#endif
 /* ss015.301: Removed the timer handler prototypes guarded under SS_MT_TMR
  * and handled mtFlag in existing timer handlers.
  */
 
 #else /* SS_MULTIPLE_PROCS */
 
-#ifdef ANSI
-PRIVATE S16 STmrDeregHndlr
+static S16 STmrDeregHndlr
 (
 ProcId proc,                /* processor */
 Ent ent,                    /* entity */
@@ -805,15 +701,6 @@ S16 period,                 /* period */
 S16 units,                  /* period units */
 SsTmrActvFn ssTmrActvFn          /* timer function */
 )
-#else
-PRIVATE S16 STmrDeregHndlr(proc, ent, inst, period, units, ssTmrActvFn)
-ProcId proc;                /* processor */
-Ent ent;                    /* entity */
-Inst inst;                  /* instance */
-S16 period;                 /* period */
-S16 units;                  /* period units*/
-SsTmrActvFn ssTmrActvFn;         /* timer function */
-#endif
 
 #endif /* SS_MULTIPLE_PROCS */
 {
@@ -822,14 +709,11 @@ SsTmrActvFn ssTmrActvFn;         /* timer function */
    SsTmrEntry *tmr;
 #ifdef SS_MULTIPLE_PROCS
 #if (ERRCLASS & ERRCLS_INT_PAR)
-   U16 procIdIdx;
+   uint16_t procIdIdx;
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 #endif /* SS_MULTIPLE_PROCS */
 
 
-   TRC1(STmrDeregHndlr);
-
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
 
 #ifdef SS_MULTIPLE_PROCS
@@ -980,7 +864,7 @@ SsTmrActvFn ssTmrActvFn;         /* timer function */
 #else
             &&  osCp.tmrTbl[idx].ssTmrActvFn.actvFnc.tmrActvFn == ssTmrActvFn.actvFnc.tmrActvFn
 #endif
-            &&  osCp.tmrTbl[idx].interval == (U32) ((period * SS_TICKS_SEC) / units))
+            &&  osCp.tmrTbl[idx].interval == (uint32_t) ((period * SS_TICKS_SEC) / units))
       {
          break;
       }