X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fmt%2Fss_queue.c;h=b7a7cc296d0eb8691bc66f921475b36e725dbb98;hb=f73456bd55152c329601f8286ae67fe9875025bc;hp=ba0b311eab8bb723e7527b13b8025ae35a157cf6;hpb=0a26c487f1b6bbb5217e47b15fa8273b2e749283;p=o-du%2Fl2.git diff --git a/src/mt/ss_queue.c b/src/mt/ss_queue.c index ba0b311ea..b7a7cc296 100644 --- a/src/mt/ss_queue.c +++ b/src/mt/ss_queue.c @@ -92,17 +92,11 @@ * File: ss_queue.c * */ -#ifdef ANSI S16 SInitQueue ( Queue *q /* queue */ ) -#else -S16 SInitQueue(q) -Queue *q; /* queue */ -#endif { - TRC1(SInitQueue) #if (ERRCLASS & ERRCLS_INT_PAR) /* check queue pointer */ @@ -142,15 +136,10 @@ Queue *q; /* queue */ * File: ss_queue.c * */ -#ifdef ANSI S16 SFlushQueue ( Queue *q /* queue */ ) -#else -S16 SFlushQueue(q) -Queue *q; /* queue */ -#endif { Buffer *tBuf; Buffer *mBuf; @@ -158,10 +147,9 @@ Queue *q; /* queue */ #ifdef T2K_MEM_LEAK_DBG char* file = __FILE__; - U32 line = __LINE__; + uint32_t line = __LINE__; #endif - TRC1(SFlushQueue) #if (ERRCLASS & ERRCLS_INT_PAR) /* check queue */ @@ -217,21 +205,13 @@ Queue *q; /* queue */ * File: ss_queue.c * */ -#ifdef ANSI S16 SCatQueue ( Queue *q1, /* queue 1 */ Queue *q2, /* queue 2 */ Order order /* order */ ) -#else -S16 SCatQueue(q1, q2, order) -Queue *q1; /* queue 1 */ -Queue *q2; /* queue 2 */ -Order order; /* order */ -#endif { - TRC1(SCatQueue) #if (ERRCLASS & ERRCLS_INT_PAR) if (q1 == NULLP) @@ -329,19 +309,12 @@ Order order; /* order */ * File: ss_queue.c * */ -#ifdef ANSI S16 SFndLenQueue ( Queue *q, /* queue */ QLen *lngPtr /* pointer to length */ ) -#else -S16 SFndLenQueue(q, lngPtr) -Queue *q; /* queue */ -QLen *lngPtr; /* pointer to length */ -#endif { - TRC1(SFndLenQueue) #if (ERRCLASS & ERRCLS_INT_PAR) /* check queue */ @@ -386,24 +359,16 @@ QLen *lngPtr; /* pointer to length */ * File: ss_queue.c * */ -#ifdef ANSI S16 SExamQueue ( Buffer **bufPtr, /* pointer to buffer */ Queue *q, /* queue */ QLen idx /* index */ ) -#else -S16 SExamQueue(bufPtr, q, idx) -Buffer **bufPtr; /* pointer to buffer */ -Queue *q; /* queue */ -QLen idx; /* index */ -#endif { Buffer *tmpBuf; QLen i; - TRC1(SExamQueue) #if (ERRCLASS & ERRCLS_INT_PAR) /* check buffer pointer */ @@ -481,24 +446,16 @@ QLen idx; /* index */ * File: ss_queue.c * */ -#ifdef ANSI S16 SAddQueue ( Buffer *mBuf, /* buffer */ Queue *q, /* queue */ QLen idx /* index */ ) -#else -S16 SAddQueue(mBuf, q, idx) -Buffer *mBuf; /* buffer */ -Queue *q; /* queue */ -QLen idx; /* index */ -#endif { Buffer *tBuf; QLen i; - TRC1(SAddQueue) #if (ERRCLASS & ERRCLS_INT_PAR) /* check queue */ @@ -606,24 +563,16 @@ QLen idx; /* index */ * File: ss_queue.c * */ -#ifdef ANSI S16 SRemQueue ( Buffer **bufPtr, /* pointer to buffer */ Queue *q, /* queue */ QLen idx /* index */ ) -#else -S16 SRemQueue(bufPtr, q, idx) -Buffer **bufPtr; /* pointer to buffer */ -Queue *q; /* queue */ -QLen idx; /* index */ -#endif { Buffer *tBuf; QLen i; - TRC1(SRemQueue) #if (ERRCLASS & ERRCLS_INT_PAR) /* check buffer pointer */ @@ -714,19 +663,12 @@ QLen idx; /* index */ * File: ss_queue.c * */ -#ifdef ANSI -INLINE S16 SQueueFirst +inline S16 SQueueFirst ( Buffer *buf, /* buffer */ Queue *q /* queue */ ) -#else -INLINE S16 SQueueFirst(buf, q) -Buffer *buf; /* buffer */ -Queue *q; /* queue */ -#endif { - TRC1(SQueueFirst) return (SAddQueue(buf, q, 0)); } /* end of SQueueFirst */ @@ -753,19 +695,12 @@ Queue *q; /* queue */ * File: ss_queue.c * */ -#ifdef ANSI -INLINE S16 SDequeueFirst +inline S16 SDequeueFirst ( Buffer **bufPtr, /* pointer to buffer */ Queue *q /* queue */ ) -#else -INLINE S16 SDequeueFirst(bufPtr, q) -Buffer **bufPtr; /* pointer to buffer */ -Queue *q; /* queue */ -#endif { - TRC2(SDequeueFirst) return (SRemQueue(bufPtr, q, 0)); } /* end of SDequeueFirst */ @@ -790,19 +725,12 @@ Queue *q; /* queue */ * File: ss_queue.c * */ -#ifdef ANSI S16 SQueueLast ( Buffer *buf, /* buffer */ Queue *q /* queue */ ) -#else -S16 SQueueLast(buf, q) -Buffer *buf; /* buffer */ -Queue *q; /* queue */ -#endif { - TRC1(SQueueLast) #if (ERRCLASS & ERRCLS_INT_PAR) /* check queue */ @@ -844,21 +772,14 @@ Queue *q; /* queue */ * File: ss_queue.c * */ -#ifdef ANSI S16 SDequeueLast ( Buffer **bufPtr, /* pointer to buffer */ Queue *q /* queue */ ) -#else -S16 SDequeueLast(bufPtr, q) -Buffer **bufPtr; /* pointer to buffer */ -Queue *q; /* queue */ -#endif { S16 ret; - TRC1(SDequeueLast) #if (ERRCLASS & ERRCLS_INT_PAR) /* check buffer pointer */ @@ -899,20 +820,14 @@ Queue *q; /* queue */ * File: ss_queue.c * */ -#ifdef ANSI S16 ssInitDmndQ ( SsDmndQ *dQueue /* Demand Queue */ ) -#else -S16 ssInitDmndQ(dQueue) -SsDmndQ *dQueue; /* Demand Queue */ -#endif { - U8 i; + uint8_t i; S16 ret; - TRC0(ssInitDmnddQ) #if (ERRCLASS & ERRCLS_INT_PAR) if (dQueue == NULLP) @@ -997,21 +912,15 @@ SsDmndQ *dQueue; /* Demand Queue */ * File: ss_queue.c * */ -#ifdef ANSI S16 ssDestroyDmndQ ( SsDmndQ *dQueue /* demand Queue */ ) -#else -S16 ssDestroyDmndQ(dQueue) -SsDmndQ *dQueue; /* demand Queue */ -#endif { - U8 i; + uint8_t i; Buffer *tBuf; S16 ret; - TRC0(ssDestroyDmndQ) #if (ERRCLASS & ERRCLS_INT_PAR) if (dQueue == NULLP) @@ -1081,7 +990,6 @@ SsDmndQ *dQueue; /* demand Queue */ * File: ss_queue.c * */ -#ifdef ANSI S16 ssDmndQPut ( SsDmndQ *dQueue, /* demand Queue */ @@ -1089,31 +997,23 @@ Buffer *mBuf, /* message buffer */ Prior priority, /* priority */ Order order /* position */ ) -#else -S16 ssDmndQPut(dQueue, mBuf, priority, order) -SsDmndQ *dQueue; /* demand Queue */ -Buffer *mBuf; /* message buffer */ -Prior priority; /* priority */ -Order order; /* position */ -#endif { #ifndef TENB_RTLIN_CHANGES - U8 maskIndex; /* mask Index */ - U8 bitPosition; /* bit position in index */ + uint8_t maskIndex; /* mask Index */ + uint8_t bitPosition; /* bit position in index */ #else - U8 qIndex; + uint8_t qIndex; #endif Queue *queue; /* queue in demand queue */ S16 ret; /* return value */ #ifdef SS_PERF int value; - U32 size; + uint32_t size; #endif #ifdef MSPD_MLOG_NEW - U32 t = MacGetTick(); + uint32_t t = MacGetTick(); #endif - TRC0(ssDmndQPut) #if (ERRCLASS & ERRCLS_INT_PAR) if (dQueue == NULLP) @@ -1287,19 +1187,13 @@ Order order; /* position */ * File: ss_queue.c * */ -#ifdef ANSI S16 ssDmndQWait ( SsDmndQ *dQueue /* demand queue */ ) -#else -S16 ssDmndQWait(dQueue) -SsDmndQ *dQueue; /* demand queue */ -#endif { S16 ret; - TRC0(ssDmndQWait) #if (ERRCLASS & ERRCLS_INT_PAR) if (dQueue == NULLP) @@ -1342,29 +1236,21 @@ SsDmndQ *dQueue; /* demand queue */ * File: ss_queue.c * */ -#ifdef ANSI S16 ssDmndQGet ( SsDmndQ *dQueue, /* demand queue */ Buffer **mBuf, /* message buffer */ Order order /* position */ ) -#else -S16 ssDmndQGet(dQueue, mBuf, order) -SsDmndQ *dQueue; /* demand queue */ -Buffer **mBuf; /* message buffer */ -Order order; /* position */ -#endif { Queue *queue; S16 ret; S16 i; #ifndef TENB_RTLIN_CHANGES - U8 bitPosition; - U8 qIndex; + uint8_t bitPosition; + uint8_t qIndex; #endif - TRC0(ssDmndQGet) #if (ERRCLASS & ERRCLS_INT_PAR) if (mBuf == NULLP) @@ -1526,25 +1412,17 @@ setting the crntSize to 0 and removing the message */ * File: ss_queue.c * */ -#ifdef ANSI S16 ssFndLenDmndQ ( SsDmndQ *dQueue, /* demand queue */ Prior priority, /* priority */ QLen *len /* queue length */ ) -#else -S16 ssFndLenDmndQ(dQueue, priority, len) -SsDmndQ *dQueue; /* demand queue */ -Prior priority; /* priority */ -QLen *len; /* queue length */ -#endif { S16 ret; /* return value */ - U8 i; + uint8_t i; - TRC0(ssFndLenDmndQ) #if (ERRCLASS & ERRCLS_INT_PAR) if ((dQueue == NULLP) || (len == NULLP))