1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
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 #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
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 *******************************************************************************/
19 /********************************************************************20**
21 Name: MTSS -- implementation specific definitions
25 Desc: Data structure definitions demanded by systems services.
26 The contents of these are for the MTSS implementation.
30 *********************************************************************21*/
36 /* mt001.301: Addition */
37 #ifdef SS_LOGGER_SUPPORT
38 /* #define __USE_POSIX */
40 #include <netinet/in.h>
41 #endif /* SS_LOGGER_SUPPORT */
43 /* TAPA task entry doesn't need anything extra for MTSS */
44 typedef S8 SsdTTskEntry;
47 /* System task entry */
48 typedef struct ssdSTskEntry
55 #ifdef SS_MULTICORE_SUPPORT
57 #endif /* SS_MULTICORE_SUPPORT */
61 #ifdef SS_DRVR_SUPPORT
62 /* Driver task entry */
63 typedef struct ssdDrvrTskEntry
71 /* timer entry--MTSS uses common timers */
72 typedef struct ssdTmrEntry
74 CmTimer timers[TMR_DEF_MAX];
79 /* dynamic pool doesn't need anything extra for MTSS */
80 typedef S8 SsdDPoolEntry;
83 /* static pool -- information for the memory management scheme */
84 typedef S8 SsdSPoolEntry;
87 /* generic pool doesn't need anything extra for MTSS */
88 typedef S8 SsdPoolEntry;
91 /* region doesn't need anything extra for MTSS */
92 typedef S8 SsdRegionEntry;
95 /* system services control point--tick count, timer implementation,
96 * console implementation, IS task implementation
100 unsigned randSeed; /* random number generator seed */
102 Ticks sysTicks; /* elapsed system ticks */
104 pthread_t tmrHdlrTID; /* timer handler thread */
105 CmTqCp tmrTqCp; /* common timer control point */
106 CmTqType tmrTq[SS_MAX_TMRS]; /* common timer queue */
108 sem_t ssStarted; /* posted when SS completes init */
110 FILE *conInFp; /* console input file pointer */
111 FILE *conOutFp; /* console output file pointer */
112 pthread_t conHdlrTID; /* console handler thread ID */
116 FILE *fileOutFp; /* output file pointer */
119 #ifdef SS_DRVR_SUPPORT
120 pthread_t isTskHdlrTID; /* IS task handler thread ID */
121 int isFildes[2]; /* pipe for SSetIntPend to isTskHdlr */
123 Bool sigEvnt; /*mt010.301 Flag to check interupt signal(SIGINT)*/
127 /* mt018.201 - added for memory configuration */
128 typedef struct mtBktCfg
130 Size blkSize; /* bucket quantum size */
131 U32 numBlks; /* the total blocks in the bucket */
134 typedef struct mtRegCfg
139 MtBktCfg bkt[SS_MAX_POOLS_PER_REG];
142 typedef struct mtMemCfg
145 MtRegCfg region[SS_MAX_REGS];
149 /* mt003.301 Readwrite lock additions */
150 #ifdef SS_LOCK_SUPPORT
151 typedef struct sLockInfo
155 #ifdef SS_RDWR_LOCK_SUPPORT
156 pthread_rwlock_t rdWrLockId;
157 #endif /* SS_RDWR_LOCK_SUPPORT */
158 #ifdef SS_REC_LOCK_SUPPORT
159 pthread_mutex_t recurLock;
160 #endif /* SS_REC_LOCK_SUPPORT */
163 #endif /* SS_LOCK_SUPPORT */
166 #endif /* __MTSSX__ */
170 /********************************************************************30**
173 **********************************************************************/