U8, U16, U32 data type changes
[o-du/l2.git] / src / mt / ss_strm.c
index fa54d40..9d8798f 100644 (file)
@@ -115,8 +115,6 @@ Region mdRegId;                 /* region for message and data blocks */
 Region datRegId;                /* region for data buffers */
 #endif
 {
-   TRC1(ssStrmCfg);
-
 
    strmCfg.mdRegion = mdRegId;
    strmCfg.datRegion = datRegId;
@@ -166,14 +164,10 @@ S32 len;                        /* bytes to remove */
 {
    S32 n;                       /* counter */
    S32 size;                    /* size of mblks of same type as head/tail */
-   U8 type;                     /* message type */
+   uint8_t type;                     /* message type */
    SsMblk *bp;                  /* mblk for iteration */
    SsMblk *first;               /* first mblk to be adjusted */
 
-
-   TRC1(ssAdjMsg);
-
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (mp == NULLP)
    {
@@ -319,12 +313,12 @@ S32 len;                        /* bytes to remove */
 SsMblk *ssAllocB
 (
 S32 size,                       /* required size */
-U32 pri                         /* message priority */
+uint32_t pri                         /* message priority */
 )
 #else
 SsMblk *ssAllocB(size, pri)
 S32 size;                       /* required size */
-U32 pri;                        /* message priority */
+uint32_t pri;                        /* message priority */
 #endif
 {
    SsMblk *bp;                  /* mblk for iteration */
@@ -336,10 +330,8 @@ U32 pri;                        /* message priority */
 
 #ifdef T2K_MEM_LEAK_DBG
    char* file = __FILE__;
-   U32 line = __LINE__;
+   uint32_t line = __LINE__;
 #endif
-   TRC1(ssAllocB);
-
 
    UNUSED(pri);
 
@@ -348,7 +340,7 @@ U32 pri;                        /* message priority */
    m = (sizeof(SsMblk) + sizeof(SsDblk));
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT
-   r = SAlloc(strmCfg.mdRegion, &m, 0, (Data **)&bp, __LINE__, (U8*)__FILE__, ENTNC);
+   r = SAlloc(strmCfg.mdRegion, &m, 0, (Data **)&bp, __LINE__, (uint8_t*)__FILE__, ENTNC);
 #else
    r = SAlloc(strmCfg.mdRegion, &m, 0, (Data **)&bp);
 #endif /* SS_HISTOGRAM_SUPPORT */
@@ -368,7 +360,7 @@ U32 pri;                        /* message priority */
       n = size;
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT
-      r = SAlloc(strmCfg.datRegion, &n, 0, &dat, __LINE__, (U8*)__FILE__, ENTNC);
+      r = SAlloc(strmCfg.datRegion, &n, 0, &dat, __LINE__, (uint8_t*)__FILE__, ENTNC);
 #else
       r = SAlloc(strmCfg.datRegion, &n, 0, &dat);
 #endif /* SS_HISTOGRAM_SUPPORT */
@@ -380,7 +372,7 @@ U32 pri;                        /* message priority */
 
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT
-         SFree(strmCfg.mdRegion, (Data *)bp, m, __LINE__, (U8*)__FILE__, ENTNC);
+         SFree(strmCfg.mdRegion, (Data *)bp, m, __LINE__, (uint8_t*)__FILE__, ENTNC);
 #else
          SFree(strmCfg.mdRegion, (Data *)bp, m);
 #endif /* SS_HISTOGRAM_SUPPORT */
@@ -394,7 +386,7 @@ U32 pri;                        /* message priority */
    }
 
    /* generic set-up-message function */
-   SS_STRM_INITB(bp, (SsDblk *)(((U8 *)bp) + sizeof(SsMblk)), dat, size, NULLP);
+   SS_STRM_INITB(bp, (SsDblk *)(((uint8_t *)bp) + sizeof(SsMblk)), dat, size, NULLP);
 
 
    return (bp);
@@ -428,11 +420,8 @@ SsMblk *mp;                     /* message block */
 #endif
 {
    SsMblk *bp;                  /* mblk for iteration */
-   U8 *ptr;                     /* pointer to data */
-   U32 size;                    /* size of data content */
-
-
-   TRC1(ssCopyB);
+   uint8_t *ptr;                     /* pointer to data */
+   uint32_t size;                    /* size of data content */
 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -501,10 +490,6 @@ SsMblk *mp;                     /* message block */
    SsMblk *first;               /* first mblk in message */
    SsMblk *bp;                  /* mblk for iteration */
 
-
-   TRC1(ssCopyMsg);
-
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (mp == NULLP)
    {
@@ -582,9 +567,6 @@ SsMblk *mp;                     /* message block */
    SsMblk *bp;                  /* mblk for iteration */
    /* ss028.103 - Addition of lock for mBuf reference count */
 
-   TRC1(ssDupB);
-
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (mp == NULLP)
    {
@@ -680,10 +662,6 @@ SsMblk *mp;                     /* message block */
    SsMblk *first;               /* first mblk in message */
    SsMblk *bp;                  /* mblk for iteration */
 
-
-   TRC1(ssDupMsg);
-
-
    /* dup the first mblock */
    first = bp = ssDupB(mp);
    if (bp == NULLP)
@@ -740,14 +718,14 @@ SsMblk *mp;                     /* message block */
 #ifdef ANSI
 SsMblk *ssESBAlloc
 (
-U8 *base,                       /* client supplied data buffer */
+uint8_t *base,                       /* client supplied data buffer */
 S32 size,                       /* size of data buffer */
 S32 pri,                        /* message priority */
 SsFrtn *fr_rtn                  /* free routine */
 )
 #else
 SsMblk *ssESBAlloc(base, size, pri, fr_rtn)
-U8 *base;                       /* client supplied data buffer */
+uint8_t *base;                       /* client supplied data buffer */
 S32 size;                       /* size of data buffer */
 S32 pri;                        /* message priority */
 SsFrtn *fr_rtn;                 /* free routine */
@@ -757,10 +735,6 @@ SsFrtn *fr_rtn;                 /* free routine */
    Size m;                      /* mblk + dblk */
    S16 r;                       /* return value */
 
-
-   TRC1(ssESBAlloc);
-
-
    UNUSED(pri);
 
 
@@ -777,11 +751,11 @@ SsFrtn *fr_rtn;                 /* free routine */
    m = (sizeof(SsMblk) + sizeof(SsDblk));
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT
-   r = SAlloc(strmCfg.mdRegion, &m, 0, (Data **)&bp, __LINE__, (U8*)__FILE__, ENTNC);
+   r = SAlloc(strmCfg.mdRegion, &m, 0, (Data **)&bp, __LINE__, (uint8_t*)__FILE__, ENTNC);
 #else
 #ifdef T2K_MEM_LEAK_DBG
    char* file = __FILE__;
-   U32 line = __LINE__;
+   uint32_t line = __LINE__;
 #endif
    r = SAlloc(strmCfg.mdRegion, &m, 0, (Data **)&bp);
 #endif /* SS_HISTOGRAM_SUPPORT */
@@ -796,7 +770,7 @@ SsFrtn *fr_rtn;                 /* free routine */
 
 
    /* use the generic set-up-message function to initialize everything */
-   SS_STRM_INITB(bp, (SsDblk *)(((U8 *)bp) + sizeof(SsMblk)),
+   SS_STRM_INITB(bp, (SsDblk *)(((uint8_t *)bp) + sizeof(SsMblk)),
                   base, size, fr_rtn);
 
 
@@ -836,17 +810,14 @@ SsMblk *mp;                     /* message block */
 
 #ifdef T2K_MEM_LEAK_DBG
    char* file = __FILE__;
-   U32 line = __LINE__;
+   uint32_t line = __LINE__;
 #endif
 
-   TRC1(ssFreeB);
-
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (mp == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS341, ERRZERO, "Null pointer");
-      RETVOID;
+      return;
    }
 #endif
 
@@ -861,7 +832,7 @@ SsMblk *mp;                     /* message block */
 
    if (mp->b_datap == NULLP)
    {
-      RETVOID;
+      return;
    }
 
 
@@ -875,7 +846,7 @@ SsMblk *mp;                     /* message block */
 
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT
-      SFree(strmCfg.mdRegion, (Data *)mp, size, __LINE__, (U8*)__FILE__, ENTNC);
+      SFree(strmCfg.mdRegion, (Data *)mp, size, __LINE__, (uint8_t*)__FILE__, ENTNC);
 #else
 #ifdef T2K_MEM_LEAK_DBG
       SFree(strmCfg.mdRegion, (Data *)mp, size);
@@ -883,7 +854,7 @@ SsMblk *mp;                     /* message block */
       SFree(strmCfg.mdRegion, (Data *)mp, size);
 #endif
 #endif /* SS_HISTOGRAM_SUPPORT */
-      RETVOID;
+      return;
    }
 
    /* ss028.103 - Addition of lock for mBuf reference count */
@@ -893,7 +864,7 @@ SsMblk *mp;                     /* message block */
    {
       SSLOGERROR(ERRCLS_DEBUG, ESS343, ERRZERO,
                      "Could not lock the mBuf Ref Lock");
-      RETVOID;
+      return;
    }
 #endif
 
@@ -907,7 +878,7 @@ SsMblk *mp;                     /* message block */
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS344, ERRZERO,
                       "Could not give the Semaphore");
-      RETVOID;
+      return;
 #endif
    }
 #endif
@@ -938,7 +909,7 @@ SsMblk *mp;                     /* message block */
 #ifdef SS_HISTOGRAM_SUPPORT
          SFree(strmCfg.datRegion, mp->b_datap->db_base,
                   (Size)(mp->b_datap->db_lim - mp->b_datap->db_base), 
-                                               __LINE__, (U8*)__FILE__, ENTNC);
+                                               __LINE__, (uint8_t*)__FILE__, ENTNC);
 #else
          SFree(strmCfg.datRegion, mp->b_datap->db_base,
                   (Size)(mp->b_datap->db_lim - mp->b_datap->db_base));
@@ -956,7 +927,7 @@ SsMblk *mp;                     /* message block */
          bp = (SsMblk *)(mp->b_datap - sizeof (SsMblk));
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT
-         SFree(strmCfg.mdRegion, (Data *)bp, size, __LINE__, (U8*)__FILE__, ENTNC);
+         SFree(strmCfg.mdRegion, (Data *)bp, size, __LINE__, (uint8_t*)__FILE__, ENTNC);
 #else
          SFree(strmCfg.mdRegion, (Data *)bp, size);
 #endif /* SS_HISTOGRAM_SUPPORT */
@@ -964,7 +935,7 @@ SsMblk *mp;                     /* message block */
 
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT
-      SFree(strmCfg.mdRegion, (Data *)mp, size, __LINE__, (U8*)__FILE__, ENTNC);
+      SFree(strmCfg.mdRegion, (Data *)mp, size, __LINE__, (uint8_t*)__FILE__, ENTNC);
 #else
       SFree(strmCfg.mdRegion, (Data *)mp, size);
 #endif /* SS_HISTOGRAM_SUPPORT */
@@ -985,14 +956,14 @@ SsMblk *mp;                     /* message block */
       {
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT
-         SFree(strmCfg.mdRegion, (Data *)mp, size, __LINE__, (U8*)__FILE__, ENTNC);
+         SFree(strmCfg.mdRegion, (Data *)mp, size, __LINE__, (uint8_t*)__FILE__, ENTNC);
 #else
          SFree(strmCfg.mdRegion, (Data *)mp, size);
 #endif /* SS_HISTOGRAM_SUPPORT */
       }
    }
 
-   RETVOID;
+   return;
 } /* ssFreeB */
 
 \f
@@ -1023,10 +994,6 @@ SsMblk *mp;                     /* message block */
 {
    SsMblk *bp;                  /* mblk for iteration */
 
-
-   TRC1(ssFreeMsg);
-
-
    /* free all the message blocks in the message */
    while (mp)
    {
@@ -1035,7 +1002,7 @@ SsMblk *mp;                     /* message block */
       ssFreeB(bp);
    }
 
-   RETVOID;
+   return;
 } /* ssFreeMsg */
 
 \f
@@ -1065,14 +1032,12 @@ SsMblk *mp;                     /* first message block */
 SsMblk *bp;                     /* second message block */
 #endif
 {
-   TRC1(ssLinkB);
-
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (mp == NULLP  ||  bp == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS345, ERRZERO, "Null pointer");
-      RETVOID;
+      return;
    }
 #endif
 
@@ -1087,7 +1052,7 @@ SsMblk *bp;                     /* second message block */
    /* link in the passed mblock */
    mp->b_cont = bp;
 
-   RETVOID;
+   return;
 } /* ssLinkB */
 
 \f
@@ -1118,10 +1083,6 @@ SsMblk *mp;                     /* message block */
    S32 n;                       /* temporary */
    S32 size;                    /* size of data */
 
-
-   TRC1(ssMsgDSize);
-
-
    /* for all blocks that are of type data, count the bytes */
    size = 0;
    while (mp)
@@ -1174,10 +1135,10 @@ S32 len;                        /* number of bytes to align */
    SsMblk *bp;                  /* mblk for iteration */
    SsMblk *newbp;               /* the new mblk */
    SsMblk *prev;                /* mblk of same type */
-   U8 *base;                    /* for swapping data buffers */
-   U8 *lim;                     /* for swapping data buffers */
-   U8 *rptr;                    /* for swapping data buffers */
-   U8 *wptr;                    /* for swapping data buffers */
+   uint8_t *base;                    /* for swapping data buffers */
+   uint8_t *lim;                     /* for swapping data buffers */
+   uint8_t *rptr;                    /* for swapping data buffers */
+   uint8_t *wptr;                    /* for swapping data buffers */
        /* ss008.301 */
 #ifdef SS_DBLK_FREE_RTN
    SsFrtn *frtn;                /* for swapping data buffers */
@@ -1185,11 +1146,7 @@ S32 len;                        /* number of bytes to align */
    S32 mLen;                    /* number of bytes in all blocks of same type */
    S32 m;                       /* temporary */
    S32 n;                       /* temporary */
-   U8 type;                     /* message type */
-
-
-   TRC1(ssPullupMsg);
-
+   uint8_t type;                     /* message type */
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (mp == NULLP)
@@ -1376,10 +1333,6 @@ SsMblk *bp;                     /* message block */
 {
    SsMblk *rp;                  /* mblk that will be returned */
 
-
-   TRC1(ssRmvB);
-
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (mp == NULLP  ||  bp == NULLP)
    {
@@ -1449,20 +1402,16 @@ SsMblk *bp;                     /* message block */
 S32 ssTestB
 (
 S32 size,                       /* size required */
-U32 pri                         /* priority of the message buffer */
+uint32_t pri                         /* priority of the message buffer */
 )
 #else
 S32 ssTestB(size, pri)
 S32 size;                       /* size required */
-U32 pri;                        /* priority of the message buffer */
+uint32_t pri;                        /* priority of the message buffer */
 #endif
 {
    SsMblk *bp;                  /* mblk for iteration */
 
-
-   TRC1(ssTestB);
-
-
    bp = ssAllocB(size, pri);
    if (bp)
    {
@@ -1503,10 +1452,6 @@ SsMblk *mp;                     /* message */
 {
    SsMblk *bp;                  /* mblk for iteration */
 
-
-   TRC1(ssUnlinkB);
-
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (mp == NULLP)
    {