1 | /* |
---|
2 | * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved. |
---|
3 | * |
---|
4 | * embedded brains GmbH |
---|
5 | * Dornierstr. 4 |
---|
6 | * 82178 Puchheim |
---|
7 | * Germany |
---|
8 | * <rtems@embedded-brains.de> |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.org/license/LICENSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #ifdef HAVE_CONFIG_H |
---|
16 | #include "config.h" |
---|
17 | #endif |
---|
18 | |
---|
19 | #include "tmacros.h" |
---|
20 | |
---|
21 | const char rtems_test_name[] = "SMPMUTEX 1"; |
---|
22 | |
---|
23 | #define SCHED_A rtems_build_name(' ', ' ', ' ', 'A') |
---|
24 | |
---|
25 | #define SCHED_B rtems_build_name(' ', ' ', ' ', 'B') |
---|
26 | |
---|
27 | #define PART_COUNT 2 |
---|
28 | |
---|
29 | #define TASK_COUNT 9 |
---|
30 | |
---|
31 | #define PRIO_NONE 0 |
---|
32 | |
---|
33 | /* Value choosen for Qemu, 2 would be sufficient for real targets */ |
---|
34 | #define TIMEOUT_IN_TICKS 10 |
---|
35 | |
---|
36 | typedef enum { |
---|
37 | REQ_WAKE_UP_MASTER = RTEMS_EVENT_0, |
---|
38 | REQ_WAKE_UP_HELPER = RTEMS_EVENT_1, |
---|
39 | REQ_MTX_OBTAIN = RTEMS_EVENT_2, |
---|
40 | REQ_MTX_OBTAIN_TIMEOUT = RTEMS_EVENT_3, |
---|
41 | REQ_MTX_RELEASE = RTEMS_EVENT_4, |
---|
42 | REQ_MTX_2_OBTAIN = RTEMS_EVENT_5, |
---|
43 | REQ_MTX_2_RELEASE = RTEMS_EVENT_6, |
---|
44 | REQ_SEM_OBTAIN_RELEASE = RTEMS_EVENT_7, |
---|
45 | REQ_SEM_RELEASE = RTEMS_EVENT_8, |
---|
46 | REQ_SET_DONE = RTEMS_EVENT_9, |
---|
47 | REQ_WAIT_FOR_DONE = RTEMS_EVENT_10, |
---|
48 | REQ_SEND_EVENT_2 = RTEMS_EVENT_11, |
---|
49 | REQ_SEND_EVENT_3 = RTEMS_EVENT_12 |
---|
50 | } request_id; |
---|
51 | |
---|
52 | typedef enum { |
---|
53 | A_1, |
---|
54 | A_2_0, |
---|
55 | A_2_1, |
---|
56 | M, |
---|
57 | B_4, |
---|
58 | B_5_0, |
---|
59 | B_5_1, |
---|
60 | H_A, |
---|
61 | H_B, |
---|
62 | NONE |
---|
63 | } task_id; |
---|
64 | |
---|
65 | typedef struct { |
---|
66 | rtems_id mtx; |
---|
67 | rtems_id mtx_2; |
---|
68 | rtems_id sem; |
---|
69 | rtems_id tasks[TASK_COUNT]; |
---|
70 | Atomic_Uint done; |
---|
71 | task_id id_2; |
---|
72 | rtems_event_set events_2; |
---|
73 | task_id id_3; |
---|
74 | rtems_event_set events_3; |
---|
75 | int generation[TASK_COUNT]; |
---|
76 | int expected_generation[TASK_COUNT]; |
---|
77 | } test_context; |
---|
78 | |
---|
79 | static test_context test_instance; |
---|
80 | |
---|
81 | static void assert_cpu(uint32_t expected_cpu) |
---|
82 | { |
---|
83 | rtems_test_assert(rtems_get_current_processor() == expected_cpu); |
---|
84 | } |
---|
85 | |
---|
86 | static void test_task_get_priority_not_defined(test_context *ctx) |
---|
87 | { |
---|
88 | rtems_status_code sc; |
---|
89 | rtems_id scheduler_id; |
---|
90 | rtems_task_priority priority; |
---|
91 | |
---|
92 | sc = rtems_scheduler_ident(SCHED_B, &scheduler_id); |
---|
93 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
94 | |
---|
95 | priority = 0; |
---|
96 | sc = rtems_task_get_priority(RTEMS_SELF, scheduler_id, &priority); |
---|
97 | rtems_test_assert(sc == RTEMS_NOT_DEFINED); |
---|
98 | rtems_test_assert(priority == 0); |
---|
99 | } |
---|
100 | |
---|
101 | static void start_task( |
---|
102 | test_context *ctx, |
---|
103 | task_id id, |
---|
104 | rtems_task_entry entry, |
---|
105 | rtems_task_priority prio, |
---|
106 | rtems_name scheduler |
---|
107 | ) |
---|
108 | { |
---|
109 | rtems_status_code sc; |
---|
110 | rtems_id scheduler_id; |
---|
111 | |
---|
112 | sc = rtems_task_create( |
---|
113 | rtems_build_name('T', 'A', 'S', 'K'), |
---|
114 | prio, |
---|
115 | RTEMS_MINIMUM_STACK_SIZE, |
---|
116 | RTEMS_DEFAULT_MODES, |
---|
117 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
118 | &ctx->tasks[id] |
---|
119 | ); |
---|
120 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
121 | |
---|
122 | sc = rtems_scheduler_ident(scheduler, &scheduler_id); |
---|
123 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
124 | |
---|
125 | sc = rtems_task_set_scheduler(ctx->tasks[id], scheduler_id, prio); |
---|
126 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
127 | |
---|
128 | sc = rtems_task_start(ctx->tasks[id], entry, id); |
---|
129 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
130 | } |
---|
131 | |
---|
132 | static void send_event(test_context *ctx, task_id id, rtems_event_set events) |
---|
133 | { |
---|
134 | rtems_status_code sc; |
---|
135 | |
---|
136 | sc = rtems_event_send(ctx->tasks[id], events); |
---|
137 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
138 | } |
---|
139 | |
---|
140 | static void set_event_2( |
---|
141 | test_context *ctx, |
---|
142 | task_id id_2, |
---|
143 | rtems_event_set events_2 |
---|
144 | ) |
---|
145 | { |
---|
146 | ctx->id_2 = id_2; |
---|
147 | ctx->events_2 = events_2; |
---|
148 | } |
---|
149 | |
---|
150 | static void set_event_3( |
---|
151 | test_context *ctx, |
---|
152 | task_id id_3, |
---|
153 | rtems_event_set events_3 |
---|
154 | ) |
---|
155 | { |
---|
156 | ctx->id_3 = id_3; |
---|
157 | ctx->events_3 = events_3; |
---|
158 | } |
---|
159 | |
---|
160 | static void clear_done(test_context *ctx) |
---|
161 | { |
---|
162 | _Atomic_Store_uint(&ctx->done, 0, ATOMIC_ORDER_RELAXED); |
---|
163 | } |
---|
164 | |
---|
165 | static void set_done(test_context *ctx) |
---|
166 | { |
---|
167 | _Atomic_Store_uint(&ctx->done, 1, ATOMIC_ORDER_RELEASE); |
---|
168 | } |
---|
169 | |
---|
170 | static bool is_done(test_context *ctx) |
---|
171 | { |
---|
172 | return _Atomic_Load_uint(&ctx->done, ATOMIC_ORDER_ACQUIRE) != 0; |
---|
173 | } |
---|
174 | |
---|
175 | static void wait_for_done(test_context *ctx) |
---|
176 | { |
---|
177 | while (!is_done(ctx)) { |
---|
178 | /* Wait */ |
---|
179 | } |
---|
180 | } |
---|
181 | |
---|
182 | static void request_pre_emption(test_context *ctx, task_id id) |
---|
183 | { |
---|
184 | clear_done(ctx); |
---|
185 | send_event(ctx, id, REQ_SET_DONE); |
---|
186 | wait_for_done(ctx); |
---|
187 | } |
---|
188 | |
---|
189 | static rtems_event_set wait_for_events(void) |
---|
190 | { |
---|
191 | rtems_event_set events; |
---|
192 | rtems_status_code sc; |
---|
193 | |
---|
194 | sc = rtems_event_receive( |
---|
195 | RTEMS_ALL_EVENTS, |
---|
196 | RTEMS_EVENT_ANY | RTEMS_WAIT, |
---|
197 | RTEMS_NO_TIMEOUT, |
---|
198 | &events |
---|
199 | ); |
---|
200 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
201 | |
---|
202 | return events; |
---|
203 | } |
---|
204 | |
---|
205 | static void sync_with_helper_by_id(test_context *ctx, task_id id) |
---|
206 | { |
---|
207 | rtems_event_set events; |
---|
208 | |
---|
209 | send_event(ctx, id, REQ_WAKE_UP_HELPER); |
---|
210 | events = wait_for_events(); |
---|
211 | rtems_test_assert(events == REQ_WAKE_UP_MASTER); |
---|
212 | } |
---|
213 | |
---|
214 | static void sync_with_helper(test_context *ctx) |
---|
215 | { |
---|
216 | sync_with_helper_by_id(ctx, H_A); |
---|
217 | sync_with_helper_by_id(ctx, H_B); |
---|
218 | } |
---|
219 | |
---|
220 | static void request(test_context *ctx, task_id id, request_id req) |
---|
221 | { |
---|
222 | send_event(ctx, id, req); |
---|
223 | clear_done(ctx); |
---|
224 | |
---|
225 | if (rtems_get_current_processor() == 0) { |
---|
226 | id = H_B; |
---|
227 | } else { |
---|
228 | id = H_A; |
---|
229 | } |
---|
230 | |
---|
231 | send_event(ctx, id, REQ_SET_DONE); |
---|
232 | wait_for_done(ctx); |
---|
233 | } |
---|
234 | |
---|
235 | static void obtain(test_context *ctx) |
---|
236 | { |
---|
237 | rtems_status_code sc; |
---|
238 | |
---|
239 | sc = rtems_semaphore_obtain(ctx->mtx, RTEMS_WAIT, RTEMS_NO_TIMEOUT); |
---|
240 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
241 | } |
---|
242 | |
---|
243 | static void obtain_timeout(test_context *ctx) |
---|
244 | { |
---|
245 | rtems_status_code sc; |
---|
246 | |
---|
247 | sc = rtems_semaphore_obtain(ctx->mtx, RTEMS_WAIT, TIMEOUT_IN_TICKS); |
---|
248 | rtems_test_assert(sc == RTEMS_TIMEOUT); |
---|
249 | } |
---|
250 | |
---|
251 | static void release(test_context *ctx) |
---|
252 | { |
---|
253 | rtems_status_code sc; |
---|
254 | |
---|
255 | sc = rtems_semaphore_release(ctx->mtx); |
---|
256 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
257 | } |
---|
258 | |
---|
259 | static void obtain_2(test_context *ctx) |
---|
260 | { |
---|
261 | rtems_status_code sc; |
---|
262 | |
---|
263 | sc = rtems_semaphore_obtain(ctx->mtx_2, RTEMS_WAIT, RTEMS_NO_TIMEOUT); |
---|
264 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
265 | } |
---|
266 | |
---|
267 | static void release_2(test_context *ctx) |
---|
268 | { |
---|
269 | rtems_status_code sc; |
---|
270 | |
---|
271 | sc = rtems_semaphore_release(ctx->mtx_2); |
---|
272 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
273 | } |
---|
274 | |
---|
275 | static void sem_obtain(test_context *ctx) |
---|
276 | { |
---|
277 | rtems_status_code sc; |
---|
278 | |
---|
279 | sc = rtems_semaphore_obtain(ctx->sem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); |
---|
280 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
281 | } |
---|
282 | |
---|
283 | static void sem_release(test_context *ctx) |
---|
284 | { |
---|
285 | rtems_status_code sc; |
---|
286 | |
---|
287 | sc = rtems_semaphore_release(ctx->sem); |
---|
288 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
289 | } |
---|
290 | |
---|
291 | static void wait(void) |
---|
292 | { |
---|
293 | rtems_status_code sc; |
---|
294 | |
---|
295 | sc = rtems_task_wake_after(TIMEOUT_IN_TICKS + 1); |
---|
296 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
297 | } |
---|
298 | |
---|
299 | static void check_generations(test_context *ctx, task_id a, task_id b) |
---|
300 | { |
---|
301 | size_t i; |
---|
302 | |
---|
303 | if (a != NONE) { |
---|
304 | ++ctx->expected_generation[a]; |
---|
305 | } |
---|
306 | |
---|
307 | if (b != NONE) { |
---|
308 | ++ctx->expected_generation[b]; |
---|
309 | } |
---|
310 | |
---|
311 | for (i = 0; i < TASK_COUNT; ++i) { |
---|
312 | rtems_test_assert(ctx->generation[i] == ctx->expected_generation[i]); |
---|
313 | } |
---|
314 | } |
---|
315 | |
---|
316 | static void set_prio(test_context *ctx, task_id id, rtems_task_priority prio) |
---|
317 | { |
---|
318 | rtems_status_code sc; |
---|
319 | |
---|
320 | sc = rtems_task_set_priority(ctx->tasks[id], prio, &prio); |
---|
321 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
322 | } |
---|
323 | |
---|
324 | static void assert_prio( |
---|
325 | test_context *ctx, |
---|
326 | task_id id, |
---|
327 | rtems_task_priority expected |
---|
328 | ) |
---|
329 | { |
---|
330 | rtems_task_priority actual; |
---|
331 | rtems_status_code sc; |
---|
332 | |
---|
333 | sc = rtems_task_set_priority( |
---|
334 | ctx->tasks[id], |
---|
335 | RTEMS_CURRENT_PRIORITY, |
---|
336 | &actual |
---|
337 | ); |
---|
338 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
339 | rtems_test_assert(expected == actual); |
---|
340 | } |
---|
341 | |
---|
342 | static void assert_prio_by_scheduler( |
---|
343 | test_context *ctx, |
---|
344 | task_id id, |
---|
345 | rtems_name scheduler, |
---|
346 | rtems_task_priority expected |
---|
347 | ) |
---|
348 | { |
---|
349 | rtems_task_priority actual; |
---|
350 | rtems_status_code sc; |
---|
351 | rtems_id scheduler_id; |
---|
352 | |
---|
353 | sc = rtems_scheduler_ident(scheduler, &scheduler_id); |
---|
354 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
355 | |
---|
356 | actual = PRIO_NONE; |
---|
357 | sc = rtems_task_get_priority( |
---|
358 | ctx->tasks[id], |
---|
359 | scheduler_id, |
---|
360 | &actual |
---|
361 | ); |
---|
362 | |
---|
363 | if (expected == PRIO_NONE) { |
---|
364 | rtems_test_assert(sc == RTEMS_NOT_DEFINED); |
---|
365 | } else { |
---|
366 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
367 | } |
---|
368 | |
---|
369 | rtems_test_assert(actual == expected); |
---|
370 | } |
---|
371 | |
---|
372 | static void helper(rtems_task_argument arg) |
---|
373 | { |
---|
374 | test_context *ctx = &test_instance; |
---|
375 | |
---|
376 | while (true) { |
---|
377 | rtems_event_set events = wait_for_events(); |
---|
378 | |
---|
379 | if ((events & REQ_WAKE_UP_HELPER) != 0) { |
---|
380 | send_event(ctx, M, REQ_WAKE_UP_MASTER); |
---|
381 | } |
---|
382 | |
---|
383 | if ((events & REQ_SEM_RELEASE) != 0) { |
---|
384 | sem_release(ctx); |
---|
385 | } |
---|
386 | |
---|
387 | if ((events & REQ_SET_DONE) != 0) { |
---|
388 | set_done(ctx); |
---|
389 | } |
---|
390 | } |
---|
391 | } |
---|
392 | |
---|
393 | static void worker(rtems_task_argument arg) |
---|
394 | { |
---|
395 | test_context *ctx = &test_instance; |
---|
396 | task_id id = arg; |
---|
397 | |
---|
398 | while (true) { |
---|
399 | rtems_event_set events = wait_for_events(); |
---|
400 | |
---|
401 | if ((events & REQ_MTX_OBTAIN) != 0) { |
---|
402 | obtain(ctx); |
---|
403 | ++ctx->generation[id]; |
---|
404 | } |
---|
405 | |
---|
406 | if ((events & REQ_MTX_OBTAIN_TIMEOUT) != 0) { |
---|
407 | obtain_timeout(ctx); |
---|
408 | ++ctx->generation[id]; |
---|
409 | } |
---|
410 | |
---|
411 | if ((events & REQ_MTX_RELEASE) != 0) { |
---|
412 | release(ctx); |
---|
413 | ++ctx->generation[id]; |
---|
414 | } |
---|
415 | |
---|
416 | if ((events & REQ_MTX_2_OBTAIN) != 0) { |
---|
417 | obtain_2(ctx); |
---|
418 | ++ctx->generation[id]; |
---|
419 | } |
---|
420 | |
---|
421 | if ((events & REQ_MTX_2_RELEASE) != 0) { |
---|
422 | release_2(ctx); |
---|
423 | ++ctx->generation[id]; |
---|
424 | } |
---|
425 | |
---|
426 | if ((events & REQ_SEM_OBTAIN_RELEASE) != 0) { |
---|
427 | sem_obtain(ctx); |
---|
428 | ++ctx->generation[id]; |
---|
429 | sem_release(ctx); |
---|
430 | } |
---|
431 | |
---|
432 | if ((events & REQ_SEND_EVENT_2) != 0) { |
---|
433 | send_event(ctx, ctx->id_2, ctx->events_2); |
---|
434 | } |
---|
435 | |
---|
436 | if ((events & REQ_SEND_EVENT_3) != 0) { |
---|
437 | send_event(ctx, ctx->id_3, ctx->events_3); |
---|
438 | } |
---|
439 | |
---|
440 | if ((events & REQ_SET_DONE) != 0) { |
---|
441 | set_done(ctx); |
---|
442 | } |
---|
443 | |
---|
444 | if ((events & REQ_WAIT_FOR_DONE) != 0) { |
---|
445 | wait_for_done(ctx); |
---|
446 | } |
---|
447 | } |
---|
448 | } |
---|
449 | |
---|
450 | static void test_init(test_context *ctx) |
---|
451 | { |
---|
452 | rtems_status_code sc; |
---|
453 | |
---|
454 | ctx->tasks[M] = rtems_task_self(); |
---|
455 | start_task(ctx, A_1, worker, 1, SCHED_A); |
---|
456 | start_task(ctx, A_2_0, worker, 2, SCHED_A); |
---|
457 | start_task(ctx, A_2_1, worker, 2, SCHED_A); |
---|
458 | start_task(ctx, B_4, worker, 4, SCHED_B); |
---|
459 | start_task(ctx, B_5_0, worker, 5, SCHED_B); |
---|
460 | start_task(ctx, B_5_1, worker, 5, SCHED_B); |
---|
461 | start_task(ctx, H_A, helper, 3, SCHED_A); |
---|
462 | start_task(ctx, H_B, helper, 6, SCHED_B); |
---|
463 | |
---|
464 | sc = rtems_semaphore_create( |
---|
465 | rtems_build_name('M', 'T', 'X', '1'), |
---|
466 | 1, |
---|
467 | RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY, |
---|
468 | 0, |
---|
469 | &ctx->mtx |
---|
470 | ); |
---|
471 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
472 | |
---|
473 | sc = rtems_semaphore_create( |
---|
474 | rtems_build_name('M', 'T', 'X', '2'), |
---|
475 | 1, |
---|
476 | RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY, |
---|
477 | 0, |
---|
478 | &ctx->mtx_2 |
---|
479 | ); |
---|
480 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
481 | |
---|
482 | sc = rtems_semaphore_create( |
---|
483 | rtems_build_name(' ', 'S', 'E', 'M'), |
---|
484 | 0, |
---|
485 | RTEMS_COUNTING_SEMAPHORE | RTEMS_PRIORITY, |
---|
486 | 0, |
---|
487 | &ctx->sem |
---|
488 | ); |
---|
489 | rtems_test_assert(sc == RTEMS_SUCCESSFUL); |
---|
490 | } |
---|
491 | |
---|
492 | static void test_simple_inheritance(test_context *ctx) |
---|
493 | { |
---|
494 | obtain(ctx); |
---|
495 | request(ctx, A_1, REQ_MTX_OBTAIN); |
---|
496 | check_generations(ctx, NONE, NONE); |
---|
497 | assert_prio(ctx, M, 1); |
---|
498 | release(ctx); |
---|
499 | check_generations(ctx, A_1, NONE); |
---|
500 | assert_prio(ctx, M, 3); |
---|
501 | request(ctx, A_1, REQ_MTX_RELEASE); |
---|
502 | check_generations(ctx, A_1, NONE); |
---|
503 | } |
---|
504 | |
---|
505 | static void test_dequeue_order_one_scheduler_instance(test_context *ctx) |
---|
506 | { |
---|
507 | obtain(ctx); |
---|
508 | request(ctx, A_2_0, REQ_MTX_OBTAIN); |
---|
509 | request(ctx, A_1, REQ_MTX_OBTAIN); |
---|
510 | request(ctx, A_2_1, REQ_MTX_OBTAIN); |
---|
511 | check_generations(ctx, NONE, NONE); |
---|
512 | assert_prio(ctx, M, 1); |
---|
513 | release(ctx); |
---|
514 | check_generations(ctx, A_1, NONE); |
---|
515 | assert_prio(ctx, M, 3); |
---|
516 | assert_prio(ctx, A_1, 1); |
---|
517 | request(ctx, A_1, REQ_MTX_RELEASE); |
---|
518 | check_generations(ctx, A_1, A_2_0); |
---|
519 | request(ctx, A_2_0, REQ_MTX_RELEASE); |
---|
520 | check_generations(ctx, A_2_0, A_2_1); |
---|
521 | request(ctx, A_2_1, REQ_MTX_RELEASE); |
---|
522 | check_generations(ctx, A_2_1, NONE); |
---|
523 | } |
---|
524 | |
---|
525 | static void test_mixed_queue_two_scheduler_instances(test_context *ctx) |
---|
526 | { |
---|
527 | obtain(ctx); |
---|
528 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
529 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
530 | |
---|
531 | request(ctx, B_4, REQ_MTX_OBTAIN_TIMEOUT); |
---|
532 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
533 | assert_prio_by_scheduler(ctx, M, SCHED_B, 4); |
---|
534 | check_generations(ctx, NONE, NONE); |
---|
535 | wait(); |
---|
536 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
537 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
538 | check_generations(ctx, B_4, NONE); |
---|
539 | |
---|
540 | request(ctx, B_4, REQ_MTX_OBTAIN); |
---|
541 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
542 | assert_prio_by_scheduler(ctx, M, SCHED_B, 4); |
---|
543 | check_generations(ctx, NONE, NONE); |
---|
544 | |
---|
545 | request(ctx, B_5_0, REQ_SEM_OBTAIN_RELEASE); |
---|
546 | send_event(ctx, H_A, REQ_SEM_RELEASE); |
---|
547 | check_generations(ctx, NONE, NONE); |
---|
548 | |
---|
549 | /* |
---|
550 | * We are in scheduler instance A. Task B_5_0 of scheduler instance B issued |
---|
551 | * the counting semaphore obtain before us. However, we inherited the |
---|
552 | * priority of B_4, so we get the semaphore before B_5_0 (priority order |
---|
553 | * within scheduler instance B). |
---|
554 | */ |
---|
555 | sem_obtain(ctx); |
---|
556 | check_generations(ctx, NONE, NONE); |
---|
557 | |
---|
558 | release(ctx); |
---|
559 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
560 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
561 | sync_with_helper(ctx); |
---|
562 | check_generations(ctx, B_4, NONE); |
---|
563 | |
---|
564 | request(ctx, B_4, REQ_MTX_RELEASE); |
---|
565 | check_generations(ctx, B_4, NONE); |
---|
566 | |
---|
567 | sem_release(ctx); |
---|
568 | sync_with_helper(ctx); |
---|
569 | check_generations(ctx, B_5_0, NONE); |
---|
570 | |
---|
571 | sem_obtain(ctx); |
---|
572 | } |
---|
573 | |
---|
574 | static void test_mixed_queue_two_scheduler_instances_sem_only(test_context *ctx) |
---|
575 | { |
---|
576 | request(ctx, B_5_0, REQ_SEM_OBTAIN_RELEASE); |
---|
577 | send_event(ctx, H_A, REQ_SEM_RELEASE); |
---|
578 | check_generations(ctx, NONE, NONE); |
---|
579 | |
---|
580 | /* |
---|
581 | * We are in scheduler instance A. Task B_5_0 of scheduler instance B issued |
---|
582 | * the counting semaphore obtain before us. No priority inheritance is |
---|
583 | * involved, so task B_5_0 gets the counting semaphore first. |
---|
584 | */ |
---|
585 | sem_obtain(ctx); |
---|
586 | check_generations(ctx, B_5_0, NONE); |
---|
587 | |
---|
588 | sem_release(ctx); |
---|
589 | } |
---|
590 | |
---|
591 | static void test_simple_inheritance_two_scheduler_instances(test_context *ctx) |
---|
592 | { |
---|
593 | obtain(ctx); |
---|
594 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
595 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
596 | |
---|
597 | request(ctx, B_5_0, REQ_MTX_OBTAIN); |
---|
598 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
599 | assert_prio_by_scheduler(ctx, M, SCHED_B, 5); |
---|
600 | |
---|
601 | request(ctx, B_4, REQ_MTX_OBTAIN); |
---|
602 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
603 | assert_prio_by_scheduler(ctx, M, SCHED_B, 4); |
---|
604 | |
---|
605 | request(ctx, B_5_1, REQ_MTX_OBTAIN); |
---|
606 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
607 | assert_prio_by_scheduler(ctx, M, SCHED_B, 4); |
---|
608 | check_generations(ctx, NONE, NONE); |
---|
609 | |
---|
610 | release(ctx); |
---|
611 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
612 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
613 | sync_with_helper(ctx); |
---|
614 | check_generations(ctx, B_4, NONE); |
---|
615 | |
---|
616 | request(ctx, B_4, REQ_MTX_RELEASE); |
---|
617 | check_generations(ctx, B_4, B_5_0); |
---|
618 | |
---|
619 | request(ctx, B_5_0, REQ_MTX_RELEASE); |
---|
620 | check_generations(ctx, B_5_0, B_5_1); |
---|
621 | |
---|
622 | request(ctx, B_5_1, REQ_MTX_RELEASE); |
---|
623 | check_generations(ctx, B_5_1, NONE); |
---|
624 | } |
---|
625 | |
---|
626 | static void test_nested_inheritance_two_scheduler_instances(test_context *ctx) |
---|
627 | { |
---|
628 | obtain_2(ctx); |
---|
629 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
630 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
631 | |
---|
632 | request(ctx, B_5_0, REQ_MTX_OBTAIN); |
---|
633 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
634 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
635 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_A, PRIO_NONE); |
---|
636 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_B, 5); |
---|
637 | check_generations(ctx, B_5_0, NONE); |
---|
638 | |
---|
639 | request(ctx, B_5_0, REQ_MTX_2_OBTAIN); |
---|
640 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
641 | assert_prio_by_scheduler(ctx, M, SCHED_B, 5); |
---|
642 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_A, PRIO_NONE); |
---|
643 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_B, 5); |
---|
644 | |
---|
645 | request(ctx, B_4, REQ_MTX_OBTAIN_TIMEOUT); |
---|
646 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
647 | assert_prio_by_scheduler(ctx, M, SCHED_B, 4); |
---|
648 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_A, PRIO_NONE); |
---|
649 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_B, 4); |
---|
650 | wait(); |
---|
651 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
652 | assert_prio_by_scheduler(ctx, M, SCHED_B, 5); |
---|
653 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_A, PRIO_NONE); |
---|
654 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_B, 5); |
---|
655 | check_generations(ctx, B_4, NONE); |
---|
656 | |
---|
657 | request(ctx, B_4, REQ_MTX_OBTAIN); |
---|
658 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
659 | assert_prio_by_scheduler(ctx, M, SCHED_B, 4); |
---|
660 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_A, PRIO_NONE); |
---|
661 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_B, 4); |
---|
662 | |
---|
663 | request(ctx, B_5_1, REQ_MTX_2_OBTAIN); |
---|
664 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
665 | assert_prio_by_scheduler(ctx, M, SCHED_B, 4); |
---|
666 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_A, PRIO_NONE); |
---|
667 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_B, 4); |
---|
668 | check_generations(ctx, NONE, NONE); |
---|
669 | |
---|
670 | release_2(ctx); |
---|
671 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
672 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
673 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_A, PRIO_NONE); |
---|
674 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_B, 4); |
---|
675 | sync_with_helper(ctx); |
---|
676 | check_generations(ctx, B_5_0, NONE); |
---|
677 | |
---|
678 | request(ctx, B_5_0, REQ_MTX_RELEASE); |
---|
679 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_A, PRIO_NONE); |
---|
680 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_B, 5); |
---|
681 | check_generations(ctx, B_4, B_5_0); |
---|
682 | |
---|
683 | request(ctx, B_4, REQ_MTX_RELEASE); |
---|
684 | check_generations(ctx, B_4, NONE); |
---|
685 | |
---|
686 | request(ctx, B_5_0, REQ_MTX_2_RELEASE); |
---|
687 | check_generations(ctx, B_5_0, B_5_1); |
---|
688 | |
---|
689 | request(ctx, B_5_1, REQ_MTX_2_RELEASE); |
---|
690 | check_generations(ctx, B_5_1, NONE); |
---|
691 | } |
---|
692 | |
---|
693 | static void test_dequeue_order_two_scheduler_instances(test_context *ctx) |
---|
694 | { |
---|
695 | obtain(ctx); |
---|
696 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
697 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
698 | |
---|
699 | request(ctx, A_2_0, REQ_MTX_OBTAIN); |
---|
700 | assert_prio_by_scheduler(ctx, M, SCHED_A, 2); |
---|
701 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
702 | check_generations(ctx, NONE, NONE); |
---|
703 | |
---|
704 | request(ctx, B_5_0, REQ_MTX_OBTAIN); |
---|
705 | assert_prio_by_scheduler(ctx, M, SCHED_A, 2); |
---|
706 | assert_prio_by_scheduler(ctx, M, SCHED_B, 5); |
---|
707 | check_generations(ctx, NONE, NONE); |
---|
708 | |
---|
709 | request(ctx, B_5_1, REQ_MTX_OBTAIN); |
---|
710 | assert_prio_by_scheduler(ctx, M, SCHED_A, 2); |
---|
711 | assert_prio_by_scheduler(ctx, M, SCHED_B, 5); |
---|
712 | |
---|
713 | request(ctx, B_4, REQ_MTX_OBTAIN); |
---|
714 | assert_prio_by_scheduler(ctx, M, SCHED_A, 2); |
---|
715 | assert_prio_by_scheduler(ctx, M, SCHED_B, 4); |
---|
716 | |
---|
717 | request(ctx, A_2_1, REQ_MTX_OBTAIN); |
---|
718 | assert_prio_by_scheduler(ctx, M, SCHED_A, 2); |
---|
719 | assert_prio_by_scheduler(ctx, M, SCHED_B, 4); |
---|
720 | |
---|
721 | request(ctx, A_1, REQ_MTX_OBTAIN); |
---|
722 | assert_prio_by_scheduler(ctx, M, SCHED_A, 1); |
---|
723 | assert_prio_by_scheduler(ctx, M, SCHED_B, 4); |
---|
724 | check_generations(ctx, NONE, NONE); |
---|
725 | |
---|
726 | release(ctx); |
---|
727 | sync_with_helper(ctx); |
---|
728 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
729 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
730 | assert_prio_by_scheduler(ctx, A_1, SCHED_A, 1); |
---|
731 | assert_prio_by_scheduler(ctx, A_1, SCHED_B, 4); |
---|
732 | check_generations(ctx, A_1, NONE); |
---|
733 | |
---|
734 | request(ctx, A_1, REQ_MTX_RELEASE); |
---|
735 | assert_prio_by_scheduler(ctx, A_1, SCHED_A, 1); |
---|
736 | assert_prio_by_scheduler(ctx, A_1, SCHED_B, PRIO_NONE); |
---|
737 | assert_prio_by_scheduler(ctx, B_4, SCHED_A, 2); |
---|
738 | assert_prio_by_scheduler(ctx, B_4, SCHED_B, 4); |
---|
739 | check_generations(ctx, A_1, B_4); |
---|
740 | |
---|
741 | request(ctx, B_4, REQ_MTX_RELEASE); |
---|
742 | assert_prio_by_scheduler(ctx, B_4, SCHED_A, PRIO_NONE); |
---|
743 | assert_prio_by_scheduler(ctx, B_4, SCHED_B, 4); |
---|
744 | assert_prio_by_scheduler(ctx, A_2_0, SCHED_A, 2); |
---|
745 | assert_prio_by_scheduler(ctx, A_2_0, SCHED_B, 5); |
---|
746 | check_generations(ctx, B_4, A_2_0); |
---|
747 | |
---|
748 | request(ctx, A_2_0, REQ_MTX_RELEASE); |
---|
749 | assert_prio_by_scheduler(ctx, A_2_0, SCHED_A, 2); |
---|
750 | assert_prio_by_scheduler(ctx, A_2_0, SCHED_B, PRIO_NONE); |
---|
751 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_A, 2); |
---|
752 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_B, 5); |
---|
753 | check_generations(ctx, A_2_0, B_5_0); |
---|
754 | |
---|
755 | request(ctx, B_5_0, REQ_MTX_RELEASE); |
---|
756 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_A, PRIO_NONE); |
---|
757 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_B, 5); |
---|
758 | assert_prio_by_scheduler(ctx, A_2_1, SCHED_A, 2); |
---|
759 | assert_prio_by_scheduler(ctx, A_2_1, SCHED_B, 5); |
---|
760 | check_generations(ctx, B_5_0, A_2_1); |
---|
761 | |
---|
762 | request(ctx, A_2_1, REQ_MTX_RELEASE); |
---|
763 | assert_prio_by_scheduler(ctx, A_2_1, SCHED_A, 2); |
---|
764 | assert_prio_by_scheduler(ctx, A_2_1, SCHED_B, PRIO_NONE); |
---|
765 | assert_prio_by_scheduler(ctx, B_5_1, SCHED_A, PRIO_NONE); |
---|
766 | assert_prio_by_scheduler(ctx, B_5_1, SCHED_B, 5); |
---|
767 | check_generations(ctx, A_2_1, B_5_1); |
---|
768 | |
---|
769 | request(ctx, B_5_1, REQ_MTX_RELEASE); |
---|
770 | assert_prio_by_scheduler(ctx, B_5_1, SCHED_A, PRIO_NONE); |
---|
771 | assert_prio_by_scheduler(ctx, B_5_1, SCHED_B, 5); |
---|
772 | check_generations(ctx, B_5_1, NONE); |
---|
773 | } |
---|
774 | |
---|
775 | static void test_omip_pre_emption(test_context *ctx) |
---|
776 | { |
---|
777 | assert_cpu(0); |
---|
778 | obtain(ctx); |
---|
779 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
780 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
781 | |
---|
782 | request(ctx, B_5_0, REQ_MTX_OBTAIN); |
---|
783 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
784 | assert_prio_by_scheduler(ctx, M, SCHED_B, 5); |
---|
785 | check_generations(ctx, NONE, NONE); |
---|
786 | |
---|
787 | request_pre_emption(ctx, A_1); |
---|
788 | assert_cpu(1); |
---|
789 | |
---|
790 | request_pre_emption(ctx, B_4); |
---|
791 | assert_cpu(0); |
---|
792 | |
---|
793 | request_pre_emption(ctx, A_1); |
---|
794 | assert_cpu(1); |
---|
795 | |
---|
796 | release(ctx); |
---|
797 | assert_cpu(0); |
---|
798 | sync_with_helper(ctx); |
---|
799 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
800 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
801 | check_generations(ctx, B_5_0, NONE); |
---|
802 | |
---|
803 | request(ctx, B_5_0, REQ_MTX_RELEASE); |
---|
804 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_A, PRIO_NONE); |
---|
805 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_B, 5); |
---|
806 | check_generations(ctx, B_5_0, NONE); |
---|
807 | } |
---|
808 | |
---|
809 | static void test_omip_rescue(test_context *ctx) |
---|
810 | { |
---|
811 | assert_cpu(0); |
---|
812 | obtain(ctx); |
---|
813 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
814 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
815 | |
---|
816 | clear_done(ctx); |
---|
817 | set_event_3(ctx, H_B, REQ_SET_DONE); |
---|
818 | set_event_2(ctx, B_5_0, REQ_SEND_EVENT_3 | REQ_MTX_OBTAIN); |
---|
819 | send_event(ctx, A_1, REQ_SEND_EVENT_2 | REQ_WAIT_FOR_DONE); |
---|
820 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
821 | assert_prio_by_scheduler(ctx, M, SCHED_B, 5); |
---|
822 | assert_cpu(1); |
---|
823 | |
---|
824 | release(ctx); |
---|
825 | assert_cpu(0); |
---|
826 | sync_with_helper(ctx); |
---|
827 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
828 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
829 | check_generations(ctx, B_5_0, NONE); |
---|
830 | |
---|
831 | request(ctx, B_5_0, REQ_MTX_RELEASE); |
---|
832 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_A, PRIO_NONE); |
---|
833 | assert_prio_by_scheduler(ctx, B_5_0, SCHED_B, 5); |
---|
834 | check_generations(ctx, B_5_0, NONE); |
---|
835 | } |
---|
836 | |
---|
837 | static void test_omip_timeout(test_context *ctx) |
---|
838 | { |
---|
839 | assert_cpu(0); |
---|
840 | obtain(ctx); |
---|
841 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
842 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
843 | |
---|
844 | clear_done(ctx); |
---|
845 | set_event_3(ctx, H_B, REQ_SET_DONE); |
---|
846 | set_event_2(ctx, B_5_0, REQ_SEND_EVENT_3 | REQ_MTX_OBTAIN_TIMEOUT); |
---|
847 | send_event(ctx, A_1, REQ_SEND_EVENT_2 | REQ_WAIT_FOR_DONE); |
---|
848 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
849 | assert_prio_by_scheduler(ctx, M, SCHED_B, 5); |
---|
850 | assert_cpu(1); |
---|
851 | |
---|
852 | wait(); |
---|
853 | assert_prio_by_scheduler(ctx, M, SCHED_A, 3); |
---|
854 | assert_prio_by_scheduler(ctx, M, SCHED_B, PRIO_NONE); |
---|
855 | check_generations(ctx, B_5_0, NONE); |
---|
856 | assert_cpu(0); |
---|
857 | |
---|
858 | release(ctx); |
---|
859 | } |
---|
860 | |
---|
861 | static void test(void) |
---|
862 | { |
---|
863 | test_context *ctx = &test_instance; |
---|
864 | |
---|
865 | test_init(ctx); |
---|
866 | test_task_get_priority_not_defined(ctx); |
---|
867 | test_simple_inheritance(ctx); |
---|
868 | test_dequeue_order_one_scheduler_instance(ctx); |
---|
869 | test_mixed_queue_two_scheduler_instances(ctx); |
---|
870 | test_mixed_queue_two_scheduler_instances_sem_only(ctx); |
---|
871 | test_simple_inheritance_two_scheduler_instances(ctx); |
---|
872 | test_nested_inheritance_two_scheduler_instances(ctx); |
---|
873 | test_dequeue_order_two_scheduler_instances(ctx); |
---|
874 | test_omip_pre_emption(ctx); |
---|
875 | test_omip_rescue(ctx); |
---|
876 | test_omip_timeout(ctx); |
---|
877 | } |
---|
878 | |
---|
879 | static void Init(rtems_task_argument arg) |
---|
880 | { |
---|
881 | TEST_BEGIN(); |
---|
882 | |
---|
883 | if (rtems_get_processor_count() >= PART_COUNT) { |
---|
884 | test(); |
---|
885 | } |
---|
886 | |
---|
887 | TEST_END(); |
---|
888 | rtems_test_exit(0); |
---|
889 | } |
---|
890 | |
---|
891 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
892 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
893 | |
---|
894 | #define CONFIGURE_SMP_APPLICATION |
---|
895 | |
---|
896 | #define CONFIGURE_SMP_MAXIMUM_PROCESSORS PART_COUNT |
---|
897 | |
---|
898 | #define CONFIGURE_SCHEDULER_SIMPLE_SMP |
---|
899 | |
---|
900 | #include <rtems/scheduler.h> |
---|
901 | |
---|
902 | RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP(a); |
---|
903 | |
---|
904 | RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP(b); |
---|
905 | |
---|
906 | #define CONFIGURE_SCHEDULER_CONTROLS \ |
---|
907 | RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP(a, SCHED_A), \ |
---|
908 | RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP(b, SCHED_B) |
---|
909 | |
---|
910 | #define CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS \ |
---|
911 | RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \ |
---|
912 | RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL) |
---|
913 | |
---|
914 | #define CONFIGURE_MAXIMUM_TASKS TASK_COUNT |
---|
915 | |
---|
916 | #define CONFIGURE_MAXIMUM_SEMAPHORES 3 |
---|
917 | |
---|
918 | #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION |
---|
919 | |
---|
920 | #define CONFIGURE_INIT_TASK_PRIORITY 3 |
---|
921 | |
---|
922 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
923 | |
---|
924 | #define CONFIGURE_INIT |
---|
925 | |
---|
926 | #include <rtems/confdefs.h> |
---|