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 35 36 37
38
39
40 /*!
41 * ======== RMAN ========
42 * Resource Manager for shared C64x+ resources.
43 */
44 @Template("./RMAN.xdt")
45
46 metaonly module RMAN {
47
48 /*!
49 * ======== tableSize ========
50 * Total number of individual resource manager (IRESMAN implementation)
51 * entries that will be registered with RMAN (including both static and
52 * dynamic)
53 */
54 config UInt tableSize = 10;
55
56 /*!
57 * ======== maxAlgs ========
58 * Maximum number of algorithm instances that will be using the RMAN
59 * module.
60 */
61 config UInt maxAlgs = 32;
62
63 /*!
64 * ======== useDSKT2 ========
65 * Flag indicating if DSKT2 should be used for memory allocation and
66 * for supporting algorithm yields.
67 *
68 * Setting this flag to `false` will disable cooperative preemption support
69 * for algorithms in RMAN.
70 */
71 config Bool useDSKT2 = true;
72
73 /*!
74 * ======== persistentAllocFxn ========
75 * Function for allocating persistent memory for RMAN's and other IRESMAN
76 * implementation's internal objects.
77 *
78 * The signature of the persistent alloc function is:
79 * extern Bool persistentAllocFxn(IALG_MemRec * memTab, Int numRecs);
80 *
81 * This is required to be supplied ONLY if {@link #useDSKT2} is set to
82 * `false`.
83 */
84 config String persistentAllocFxn = null;
85
86 /*!
87 * ======== persistentFreeFxn ========
88 * Function for freeing persistent memory used by RMAN and other IRESMAN
89 * implementation's internal objects.
90 *
91 * The signature of hte persistentFreeFxn is:
92 *
93 * extern Void persistentFreeFxn(IALG_MemRec *memTab, Int numRecs);
94 *
95 * This is required to be supplied ONLY if {@link #useDSKT2} is set to
96 * `false`.
97 */
98 config String persistentFreeFxn = null;
99
100 /*!
101 * ======== ipcKeyBase ========
102 * For multi-process support only. This is the base value of MP objects
103 * used by RMAN.
104 * The MP objects created by RMAN will use keys starting at this
105 * value, and incrementing with each new object. There is currently
106 * only one RMAN lock. The default value of ipcKeyBase is the ascii
107 * code for "RMAN".
108 *
109 * WARNING: This value should only be changed if it conflicts with
110 * another key in the system that cannot be changed. If this value
111 * is changed, all programs using RMAN that will be run simultaneously
112 * must have the ipcKeyBase configured to the new value.
113 * @_nodoc
114 */
115 config UInt ipcKeyBase = 0x524D414E;
116
117 /*!
118 * ======== yieldSamePriority ========
119 * Flag indicating if yields to same priority should happen or not
120 *
121 * This is required only if {@link #useDSKT2} is set to `true`.
122 */
123 config bool yieldSamePriority = false;
124
125 /*!
126 * ======== semCreateFxn ========
127 * Deprecated
128 * Function to create semaphores used by various individual resource
129 * manager(s) registered with RMAN.
130 *
131 * Function signature is:
132 * @p(code)
133 * Void * _semCreate(Int key, Int count);
134 * @_nodoc
135 */
136 config String semCreateFxn = null;
137
138 /*!
139 * ======== semDeleteFxn ========
140 * Deprecated
141 * Function to delete semaphores used by various individual resource
142 * manager(s) registered with RMAN.
143 *
144 * Function signature is:
145 * @p(code)
146 * Void _semDelete(Void * sem);
147 * @_nodoc
148 */
149 config String semDeleteFxn = null;
150
151 /*!
152 * ======== semPendFxn ========
153 * Deprecated
154 * Function to pend on semaphores used by various resource manager(s)
155 * registered with RMAN.
156 *
157 * Function signature is:
158 * @p(code)
159 * Int _semPend(Void * sem, unsigned int timeout);
160 * @_nodoc
161 */
162 config String semPendFxn = null;
163
164 /*!
165 * ======== semPostFxn ========
166 * @Deprecated
167 * Function to post on Semaphores used by various resource manager(s)
168 * registered with RMAN.
169 *
170 * Function signature is:
171 * @p(code)
172 * Void _semPost(Void * sem);
173 * @_nodoc
174 */
175 config String semPostFxn = null;
176
177 /*!
178 * ======== lockFxn ========
179 * Deprecated
180 * Function for handling the release and lock of scratch groups required
181 * during yield to higher or same priority algorithm
182 * Void _acquireLock(Int scratchId);
183 * @_nodoc
184 */
185 config String lockFxn = null;
186
187 /*!
188 * ======== unlockFxn ========
189 * Deprecated
190 * Function for handling the release and lock of scratch groups required
191 * during yield to higher or same priority algorithm
192 * Void _releaseLock(Int scratchId);
193 * @_nodoc
194 */
195 config String unlockFxn = null;
196
197 /*!
198 * ======== setContext ========
199 * Deprecated
200 * Function for handling setting and obtaining the Yield context of a
201 * scratch group during yield to higher or same priority algorithm
202 * Void _setContext(Int scratchId, IRES_YieldContextHandle context);
203 * @_nodoc
204 */
205 config String setContextFxn = null;
206
207 /*!
208 * ======== getContext ========
209 * Deprecated
210 * Function for handling setting and obtaining the Yield context of a
211 * scratch group during yield to higher or same priority algorithm
212 * IRES_YieldContextHandle _getContext(Int scratchId);
213 * @_nodoc
214 */
215 config String getContextFxn = null;
216
217 /*!
218 * ======== yieldFxn ========
219 * Deprecated
220 * Function to call to yield to another task of the same priority.
221 * Required only if the yieldSamePriority flag is set to "true".
222 * @_nodoc
223 */
224 config String yieldFxn = null;
225 }
226 227 228 229
230