1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
33 /*!
34 * ======== RMAN ========
35 * Resource Manager for shared C64x+ resources.
36 */
37 @Template("./RMAN.xdt")
38
39 metaonly module RMAN {
40
41 /*!
42 * ======== tableSize ========
43 * Total number of individual resource manager (IRESMAN implementation)
44 * entries that will be registered with RMAN (including both static and
45 * dynamic)
46 */
47 config UInt tableSize = 10;
48
49 /*!
50 * ======== maxAlgs ========
51 * Maximum number of algorithm instances that will be using the RMAN
52 * module.
53 */
54 config UInt maxAlgs = 32;
55
56 /*!
57 * ======== useDSKT2 ========
58 * Flag indicating if DSKT2 should be used for memory allocation and
59 * for supporting algorithm yields.
60 *
61 * Setting this flag to `false` will disable cooperative preemption support
62 * for algorithms in RMAN.
63 */
64 config Bool useDSKT2 = true;
65
66 /*!
67 * ======== persistentAllocFxn ========
68 * Function for allocating persistent memory for RMAN's and other IRESMAN
69 * implementation's internal objects.
70 *
71 * The signature of the persistent alloc function is:
72 * extern Bool persistentAllocFxn(IALG_MemRec * memTab, Int numRecs);
73 *
74 * This is required to be supplied ONLY if {@link #useDSKT2} is set to
75 * `false`.
76 */
77 config String persistentAllocFxn = null;
78
79 /*!
80 * ======== persistentFreeFxn ========
81 * Function for freeing persistent memory used by RMAN and other IRESMAN
82 * implementation's internal objects.
83 *
84 * The signature of hte persistentFreeFxn is:
85 *
86 * extern Void persistentFreeFxn(IALG_MemRec *memTab, Int numRecs);
87 *
88 * This is required to be supplied ONLY if {@link #useDSKT2} is set to
89 * `false`.
90 */
91 config String persistentFreeFxn = null;
92
93 /*!
94 * ======== yieldSamePriority ========
95 * Flag indicating if yields to same priority should happen or not
96 *
97 * This is required only if {@link #useDSKT2} is set to `true`.
98 */
99 config bool yieldSamePriority = false;
100
101 /*!
102 * ======== semCreateFxn ========
103 * Function to create semaphores used by various individual resource
104 * manager(s) registered with RMAN.
105 *
106 * Function signature is:
107 * @p(code)
108 * Void * _semCreate(Int key, Int count);
109 */
110 config String semCreateFxn = null;
111
112 /*!
113 * ======== semDeleteFxn ========
114 * Function to delete semaphores used by various individual resource
115 * manager(s) registered with RMAN.
116 *
117 * Function signature is:
118 * @p(code)
119 * Void _semDelete(Void * sem);
120 */
121 config String semDeleteFxn = null;
122
123 /*!
124 * ======== semPendFxn ========
125 * Function to pend on semaphores used by various resource manager(s)
126 * registered with RMAN.
127 *
128 * Function signature is:
129 * @p(code)
130 * Int _semPend(Void * sem, UInt32 timeout);
131 */
132 config String semPendFxn = null;
133
134 /*!
135 * ======== semPostFxn ========
136 * Function to post on Semaphores used by various resource manager(s)
137 * registered with RMAN.
138 *
139 * Function signature is:
140 * @p(code)
141 * Void _semPost(Void * sem);
142 */
143 config String semPostFxn = null;
144
145 /*!
146 * ======== debug ========
147 * Enable the debug profile of the RMAN module.
148 *
149 * This will result in a larger and slower library being linked in,
150 * but it will provide extra parameter checking to ensure callers are
151 * meeting the API requirements.
152 *
153 * If these API requirements are not met, `SYS_abort()` will be called.
154 * @_nodoc
155 */
156 config bool debug = false;
157
158 /*!
159 * ======== trace ========
160 * Enable trace in the RMAN library.
161 *
162 * This will result in a larger and slower library being linked in,
163 * but it will provide trace statements for debugging purposes.
164 * @_nodoc
165 */
166 config bool trace = false;
167
168 /*!
169 * ======== lockFxn ========
170 * Deprecated
171 * Function for handling the release and lock of scratch groups required
172 * during yield to higher or same priority algorithm
173 * Void _acquireLock(Int scratchId);
174 * @_nodoc
175 */
176 config String lockFxn = null;
177
178 /*!
179 * ======== unlockFxn ========
180 * Deprecated
181 * Function for handling the release and lock of scratch groups required
182 * during yield to higher or same priority algorithm
183 * Void _releaseLock(Int scratchId);
184 * @_nodoc
185 */
186 config String unlockFxn = null;
187
188 /*!
189 * ======== setContext ========
190 * Deprecated
191 * Function for handling setting and obtaining the Yield context of a
192 * scratch group during yield to higher or same priority algorithm
193 * Void _setContext(Int scratchId, IRES_YieldContextHandle context);
194 * @_nodoc
195 */
196 config String setContextFxn = null;
197
198 /*!
199 * ======== getContext ========
200 * Deprecated
201 * Function for handling setting and obtaining the Yield context of a
202 * scratch group during yield to higher or same priority algorithm
203 * IRES_YieldContextHandle _getContext(Int scratchId);
204 * @_nodoc
205 */
206 config String getContextFxn = null;
207
208 /*!
209 * ======== yieldFxn ========
210 * Deprecated
211 * Function to call to yield to another task of the same priority.
212 * Required only if the yieldSamePriority flag is set to "true".
213 * @_nodoc
214 */
215 config String yieldFxn = null;
216 }
217 218 219
220