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