summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/scheduler.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-19 11:20:58 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-20 16:11:02 +0200
commit7dfb4b970cbd22cef170b2f45a41f445406a2ce5 (patch)
treed26b77b23f3e95c52b2b89e147b4e2dd557395b7 /cpukit/score/include/rtems/score/scheduler.h
parentfat: Fix for invalid cluster sizes (diff)
downloadrtems-7dfb4b970cbd22cef170b2f45a41f445406a2ce5.tar.bz2
score: Add per scheduler instance maximum priority
The priority values are only valid within a scheduler instance. Thus, the maximum priority value must be defined per scheduler instance. The first scheduler instance defines PRIORITY_MAXIMUM. This implies that RTEMS_MAXIMUM_PRIORITY and POSIX_SCHEDULER_MAXIMUM_PRIORITY are only valid for threads of the first scheduler instance. Further API/implementation changes are necessary to fix this. Update #2556.
Diffstat (limited to 'cpukit/score/include/rtems/score/scheduler.h')
-rw-r--r--cpukit/score/include/rtems/score/scheduler.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h
index 5296644aeb..1e6236fa4d 100644
--- a/cpukit/score/include/rtems/score/scheduler.h
+++ b/cpukit/score/include/rtems/score/scheduler.h
@@ -201,6 +201,14 @@ struct Scheduler_Control {
Scheduler_Operations Operations;
/**
+ * @brief The maximum priority value of this scheduler.
+ *
+ * It defines the lowest (least important) thread priority for this
+ * scheduler. For example the idle threads have this priority.
+ */
+ Priority_Control maximum_priority;
+
+ /**
* @brief The scheduler name.
*/
uint32_t name;
@@ -555,6 +563,12 @@ void _Scheduler_default_Start_idle(
#define SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY
#endif
+/**
+ * @brief This defines the lowest (least important) thread priority of the
+ * first scheduler instance.
+ */
+#define PRIORITY_MAXIMUM ( _Scheduler_Table[ 0 ].maximum_priority )
+
/**@}*/
#ifdef __cplusplus