Adding new commiter to ODU-High repo
[o-du/l2.git] / src / mt / ss_queue.h
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.h
28   
29 *********************************************************************21*/
30
31
32 #ifndef __SSQUEUEH__
33 #define __SSQUEUEH__
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39
40 #define SS_MAX_TASK_PRI         4               /* maximum task priorities */
41 #define SS_MAX_MSG_PRI          4               /* maximum msg priorities */
42
43
44 #define SS_DQ_FIRST             0               /* queue at beginning */
45 #define SS_DQ_LAST              1               /* queue at end */
46
47
48 #define SS_MAX_NUM_DQ           (SS_MAX_TASK_PRI * SS_MAX_MSG_PRI)
49                                                 /* number of queues */
50 #ifndef TENB_RTLIN_CHANGES
51 #define SS_DQ_BIT_MASK_LEN      ((SS_MAX_NUM_DQ - 1) /8 + 1)
52 #endif
53
54 #define SS_MAX_DQ_PRIOR         (SS_MAX_TASK_PRI * SS_MAX_MSG_PRI) 
55
56
57 /* macros for first and last calls */
58 #define ssDmndQPutFirst(dQueue, mBuf, priority) \
59         ssDmndQPut(dQueue, mBuf, (Prior)priority, SS_DQ_FIRST)
60  
61 #define ssDmndQPutLast(dQueue, mBuf, priority) \
62         ssDmndQPut(dQueue, mBuf, (Prior)priority, SS_DQ_LAST)
63  
64 #define ssDmndQGetFirst(dQueue, mBuf) \
65         ssDmndQGet(dQueue, mBuf, SS_DQ_FIRST)
66
67 #define ssDmndQGetLast(dQueue, mBuf) \
68          ssDmndQGet(dQueue, mBuf, SS_DQ_LAST)
69  
70
71 #ifdef __cplusplus
72 }
73 #endif
74
75 #endif /* __SSQUEUEH__ */
76
77
78 \f
79 /********************************************************************30**
80   
81          End of file
82 **********************************************************************/