Initial commit
[o-du/l2.git] / src / mt / ss_queue.x
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17 *******************************************************************************/
18
19 /********************************************************************20**
20  
21      Name:     System Services -- Queueing
22  
23      Type:     C include file
24  
25      Desc:     System Services queuing functions.
26  
27      File:     ss_queue.x
28   
29 *********************************************************************21*/
30
31
32 #ifndef __SSQUEUEX__
33 #define __SSQUEUEX__
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39
40 /* demand queue structure */
41 typedef struct ssDmndQ
42 {
43    SsSemaId   dmndQSema;                        /* lock for queue access */
44    SLockId    dmndQLock[SS_MAX_NUM_DQ];    /* lock for each byte in 
45                                                  * bitmask */
46    Queue      queue[SS_MAX_NUM_DQ];             /* the queues */
47 #ifndef TENB_RTLIN_CHANGES
48    U8         bitMask[SS_DQ_BIT_MASK_LEN];      /* bit mask */
49 #endif
50 } SsDmndQ;
51
52
53
54 /* functions */
55 EXTERN S16  ssInitDmndQ       ARGS((SsDmndQ *queue));
56 EXTERN S16  ssDestroyDmndQ    ARGS((SsDmndQ *queue));
57 EXTERN S16  ssDmndQPut        ARGS((SsDmndQ *queue, Buffer *mBuf, \
58                                               Prior prior, Order order));
59 EXTERN S16  ssDmndQGet        ARGS((SsDmndQ *queue, Buffer **mBuf, \
60                                                            Order order));
61 EXTERN S16  ssDmndQWait     ARGS((SsDmndQ *queue));
62
63 EXTERN S16  ssFndLenDmndQ     ARGS((SsDmndQ *queue, Prior prior, QLen *len));
64
65
66 #ifdef __cplusplus
67 }
68 #endif
69
70 #endif /* __SSQUEUEX__ */
71
72 \f
73 /********************************************************************30**
74   
75          End of file
76 **********************************************************************/