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: System Services -- Task Management
25 Desc: Data structure definitions required for the task mgmt.
29 *********************************************************************21*/
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 uint8_t SsCntr;
45 typedef uint8_t SsIdx;
46 #else /* SS_MULTIPLE_PROCS */
47 typedef uint16_t SsCntr;
48 typedef uint16_t SsIdx;
49 #endif /* SS_MULTIPLE_PROCS */
52 /* forward declaration */
53 typedef struct ssSTskEntry SsSTskEntry;
56 /* individual entry in the table of TAPA tasks */
57 typedef struct ssTTskEntry
59 SsdTTskEntry dep; /* implementation specific */
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 */
74 SsSTskEntry *sTsk; /* system task */
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 */
83 /* ss001.301: additions */
84 #ifdef SS_HISTOGRAM_SUPPORT
86 #endif /* SS_HISTOGRAM_SUPPORT */
88 /* ss001.301: additions */
89 /* ss002.301: Modifications */
90 #ifdef SS_THREAD_PROFILE
95 #endif /* SS_THREAD_PROFILE */
97 ActvTsk cbTsk; /* call back function pointer */
103 /* individual entry in the table of system tasks */
106 SsdSTskEntry dep; /* implementation specific */
107 Bool used; /* entry is used or not */
108 Bool termPend; /* termination pending */
109 SSTskId tskId; /* system task ID */
110 SSTskPrior tskPrior; /* system task priority */
111 SsDmndQ dQ; /* demand queue */
114 /* TAPA task information: the TAPA tasks being handled by
117 SsIdx tTsks[SS_MAX_TTSKS]; /* indices into TAPA task table */
118 SsCntr numTTsks; /* count of TAPA tasks */
119 SLockId lock; /* lock for table access */
122 SsIdx nxt; /* table implementation */
123 #ifdef SS_MULTICORE_SUPPORT
134 #endif /* __SSTASKX__ */
138 /********************************************************************30**
141 **********************************************************************/