1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup ScoreScheduler |
---|
5 | * |
---|
6 | * @brief Scheduler SMP Debug Implementation |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2014 embedded brains GmbH. All rights reserved. |
---|
11 | * |
---|
12 | * embedded brains GmbH |
---|
13 | * Dornierstr. 4 |
---|
14 | * 82178 Puchheim |
---|
15 | * Germany |
---|
16 | * <rtems@embedded-brains.de> |
---|
17 | * |
---|
18 | * The license and distribution terms for this file may be |
---|
19 | * found in the file LICENSE in this distribution or at |
---|
20 | * http://www.rtems.org/license/LICENSE. |
---|
21 | */ |
---|
22 | |
---|
23 | #if HAVE_CONFIG_H |
---|
24 | #include "config.h" |
---|
25 | #endif |
---|
26 | |
---|
27 | #include <rtems/score/schedulerimpl.h> |
---|
28 | #include <rtems/score/schedulerpriorityimpl.h> |
---|
29 | |
---|
30 | #if defined(RTEMS_DEBUG) |
---|
31 | |
---|
32 | /* |
---|
33 | * Table with all valid state transitions for _Scheduler_Thread_change_state() |
---|
34 | * in case RTEMS_DEBUG is defined. |
---|
35 | */ |
---|
36 | const bool _Scheduler_Thread_state_valid_state_changes[ 3 ][ 3 ] = { |
---|
37 | /* FROM / TO BLOCKED SCHEDULED READY */ |
---|
38 | /* BLOCKED */ { false, true, true }, |
---|
39 | /* SCHEDULED */ { true, false, true }, |
---|
40 | /* READY */ { true, true, true } |
---|
41 | }; |
---|
42 | |
---|
43 | /* |
---|
44 | * Table with all valid state transitions for |
---|
45 | * _Scheduler_SMP_Node_change_state() in case RTEMS_DEBUG is defined. |
---|
46 | */ |
---|
47 | const bool _Scheduler_SMP_Node_valid_state_changes[ 3 ][ 3 ] = { |
---|
48 | /* FROM / TO BLOCKED SCHEDULED READY */ |
---|
49 | /* BLOCKED */ { false, true, true }, |
---|
50 | /* SCHEDULED */ { true, false, true }, |
---|
51 | /* READY */ { true, true, false } |
---|
52 | }; |
---|
53 | |
---|
54 | #endif |
---|