Update in ODU high and near RT RIC IP address for integration
[o-du/l2.git] / src / mt / ss_task.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 -- Task Management
22  
23      Type:     C include file
24  
25      Desc:     Data structure definitions required for the task mgmt.
26  
27      File:     ss_task.x
28  
29 *********************************************************************21*/
30
31
32 #ifndef __SSTASKX__
33 #define __SSTASKX__
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39
40 /* miscellaneous types */
41 /* ss029.103: modification: 
42    data type changed to allow more number of TAPA tasks */ 
43 #ifndef SS_MULTIPLE_PROCS
44 typedef U8                      SsCntr;
45 typedef U8                      SsIdx;
46 #else /* SS_MULTIPLE_PROCS */
47 typedef U16                      SsCntr;
48 typedef U16                      SsIdx;
49 #endif /* SS_MULTIPLE_PROCS */
50
51
52 /* forward declaration */
53 typedef struct ssSTskEntry      SsSTskEntry;
54
55
56 /* individual entry in the table of TAPA tasks */
57 typedef struct ssTTskEntry
58 {
59    SsdTTskEntry dep;                    /* implementation specific */
60
61
62    Bool         used;                   /* entry is used? */
63 /* ss029.103: addition: procId added */ 
64 #ifdef SS_MULTIPLE_PROCS
65    ProcId       proc;                   /* task processor ID */
66 #endif /* SS_MULTIPLE_PROCS */
67    Ent          ent;                    /* task entity ID */
68    Inst         inst;                   /* task instance ID */
69    Ttype        tskType;                /* normal/permanent/driver */
70    Prior        tskPrior;               /* priority of task */
71    PAIFS16      initTsk;                /* initialization function */
72    ActvTsk      actvTsk;                /* activation function */
73
74    SsSTskEntry  *sTsk;                  /* system task */
75
76
77    SsIdx        nxt;                    /* table implementation */
78 /* ss029.103: addition: TAPA task control block (user level) added */ 
79 #ifdef SS_MULTIPLE_PROCS
80    Void         *xxCb;                  /* protocol control block */
81 #endif /* SS_MULTIPLE_PROCS */
82
83 /* ss001.301: additions */
84 #ifdef SS_HISTOGRAM_SUPPORT
85    Bool         hstReg;
86 #endif /* SS_HISTOGRAM_SUPPORT */
87
88 /* ss001.301: additions */
89 /* ss002.301: Modifications */
90 #ifdef SS_THREAD_PROFILE
91    Bool        updated;
92    Event       curEvent;
93    U32         curEvtTime;
94    U64         totTime;
95 #endif /* SS_THREAD_PROFILE */
96         /* ss02.301 */
97         ActvTsk     cbTsk; /* call back function pointer */
98
99 } SsTTskEntry;
100
101
102
103 /* individual entry in the table of system tasks */
104 struct ssSTskEntry
105 {
106    SsdSTskEntry dep;                    /* implementation specific */
107
108
109    Bool         used;                   /* entry is used or not */
110    Bool         termPend;               /* termination pending */
111    SSTskId      tskId;                  /* system task ID */
112    SSTskPrior   tskPrior;               /* system task priority */
113    SsDmndQ      dQ;                     /* demand queue */
114
115
116    /* TAPA task information: the TAPA tasks being handled by
117     *  this system task.
118     */
119    SsIdx        tTsks[SS_MAX_TTSKS];    /* indices into TAPA task table */
120    SsCntr       numTTsks;               /* count of TAPA tasks */
121    SLockId      lock;                   /* lock for table access */
122
123
124    SsIdx        nxt;                    /* table implementation */
125 #ifdef SS_MULTICORE_SUPPORT
126    Region       region;
127 #endif
128
129 };
130
131
132 #ifdef __cplusplus
133 }
134 #endif
135
136 #endif  /*  __SSTASKX__  */
137
138
139 \f  
140 /********************************************************************30**
141
142          End of file
143 **********************************************************************/