Adding new commiter to ODU-High repo
[o-du/l2.git] / src / mt / ss_timer.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 -- Timing
22  
23      Type:     C include file
24  
25      Desc:     Data structure definitions required for timing.
26  
27      File:     ss_timer.x
28  
29 *********************************************************************21*/
30
31
32 #ifndef __SSTIMERX__
33 #define __SSTIMERX__
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39
40
41 /* timer ID and type */
42 typedef SsIdx           SsTmrId;
43 /* ss015.301 Enclosed all timer activation functions in a union. */
44 typedef union {
45 #ifdef SS_MULTIPLE_PROCS
46     PAIFTMRS16        tmrActvFn;
47 #else
48     PAIFTMRS16        tmrActvFnMt;
49     PFS16             tmrActvFn;
50 #endif
51 }pTmrActvFn;
52
53
54 typedef struct ssTmrActvFn
55 {
56     Bool                 mtFlag;                 /* TRUE if tmrActvFnMt to be used */
57     pTmrActvFn           actvFnc;
58 }SsTmrActvFn;
59
60
61
62 /* individual entry in the timer table */
63 typedef struct ssTmrEntry
64 {
65    SsdTmrEntry  dep;                    /* implementation specific */
66
67
68    Bool         used;                   /* entry is used? */
69    SsTmrId      tmrId;                  /* timer ID */
70 /* ss029.103: addition: procId added */ 
71 #ifdef SS_MULTIPLE_PROCS
72    ProcId       ownerProc;              /* owner task processor ID */
73 #endif /* SS_MULTIPLE_PROCS */
74    Ent          ownerEnt;               /* owner task entity ID */
75    Inst         ownerInst;              /* owner task instance ID */
76    /* ss028.103 - Modification for SRegCfgTmr support */
77    uint32_t     interval;               /* timer interval */
78    /* ss029.103: modification: timer function type modified */ 
79    /* ss015.301 Enclosed all timer activation functions in a union. */
80    SsTmrActvFn  ssTmrActvFn;
81
82    Buffer       *mBuf;                  /* timer message buffer */
83
84
85    SsIdx        nxt;                    /* table implementation */
86
87 } SsTmrEntry;
88
89
90
91 #ifdef __cplusplus
92 }
93 #endif
94
95 #endif  /*  __SSTIMERX__  */
96
97
98 \f  
99 /********************************************************************30**
100
101          End of file
102 **********************************************************************/