fix with fapi files
[o-du/l2.git] / src / mt / ss_msg.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 -- Message manipulation functions
22  
23      Type:     C include file
24  
25      Desc:     Data structure definitions for message related functions.
26  
27      File:     ss_msg.x
28  
29 *********************************************************************21*/
30
31 #ifndef __SSMSGX__
32 #define __SSMSGX__
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38
39 /* pool type -- dynamic or static */
40 typedef U8              SsPoolType;
41
42
43
44 /* dynamic pool */
45 typedef struct ssDPoolEntry
46 {
47    SsdDPoolEntry        dep;                    /* implementation specific */
48    Size                 size;                   /* to use for SAlloc() */
49 } SsDPoolEntry;
50
51
52 /* static pool */
53 typedef struct ssSPoolEntry
54 {
55    SsdSPoolEntry        dep;                    /* implementation specific */
56 } SsSPoolEntry;
57
58
59 /* generic pool (includes dynamic and static) */
60 typedef struct ssPoolEntry
61 {
62    SsdPoolEntry         dep;                    /* implementation specific */
63    SsPoolType           type;                   /* dynamic or static */
64    union 
65    {
66       SsSPoolEntry      spool;                  /* static pool */
67       SsDPoolEntry      dpool;                  /* dynamic pool */
68    } u;
69 } SsPoolEntry;
70
71
72 /* event information--what kind of message is this */
73 typedef struct ssEventInfo
74 {
75    U8 event;                                    /* event type */
76    union
77    {
78       struct
79       {
80          SsIdx tmrIdx;                          /* timer index */
81          Bool  inUse;                           /* message in use? */
82          Bool  dynBuf;                          /* dynamic buffer? */
83       } tmr;                                    /* for timer events */
84    } u;
85 } SsEventInfo;
86
87
88 /* Information stored in the control portion of a message.
89  * The SGETBUFREGION, SGETBUFPOOL, SGetBufRegionPool macros
90  * depend on the order of the first two elements of this
91  * structure. Make sure the macros are consistent with the
92  * definition here.
93  */
94 typedef struct ssMsgInfo
95 {
96    Region       region;                         /* region id of the msg chain */
97    Pool         pool;                           /* pool id of the msg chain */
98    MsgLen       len;                            /* num of bytes in the msg */
99    Buffer       *endptr;                        /* ptr to last mblk in chain */
100    Buffer       *next;                          /* for SInitNxtDBuf() */
101    Pst          pst;                            /* post for this message */
102    SsEventInfo  eventInfo;                      /* event information */
103 } SsMsgInfo;
104
105 #ifdef __cplusplus
106 }
107 #endif
108
109 #endif /* __SSMSGX__ */
110
111  
112 \f
113 /********************************************************************30**
114  
115          End of file
116 **********************************************************************/