mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-24 06:35:36 +08:00
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.
This commit is contained in:
@@ -883,6 +883,7 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
|
||||
CONFIGURE_MAXIMUM_PRIORITY + 1 \
|
||||
)
|
||||
|
||||
/** Configure the controls for this scheduler instance */
|
||||
#define CONFIGURE_SCHEDULER_CONTROLS \
|
||||
RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP( \
|
||||
dflt, \
|
||||
@@ -3349,18 +3350,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
|
||||
uint32_t rtems_minimum_stack_size =
|
||||
CONFIGURE_MINIMUM_TASK_STACK_SIZE;
|
||||
|
||||
/**
|
||||
* This variable specifies the maximum priority value that
|
||||
* a task may have. This must be a power of 2 between 4
|
||||
* and 256 and is specified in terms of Classic API
|
||||
* priority values.
|
||||
*
|
||||
* NOTE: This is left as a simple uint8_t so it can be externed as
|
||||
* needed without requring being high enough logical to
|
||||
* include the full configuration table.
|
||||
*/
|
||||
uint8_t rtems_maximum_priority = CONFIGURE_MAXIMUM_PRIORITY;
|
||||
|
||||
/**
|
||||
* This is the primary Configuration Table for this application.
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2014 embedded brains GmbH. All rights reserved.
|
||||
* Copyright (c) 2014, 2016 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Dornierstr. 4
|
||||
@@ -70,6 +70,7 @@
|
||||
{ \
|
||||
&RTEMS_SCHEDULER_CONTEXT_CBS_NAME( name ).Base, \
|
||||
SCHEDULER_CBS_ENTRY_POINTS, \
|
||||
SCHEDULER_CBS_MAXIMUM_PRIORITY, \
|
||||
( obj_name ) \
|
||||
}
|
||||
#endif
|
||||
@@ -87,6 +88,7 @@
|
||||
{ \
|
||||
&RTEMS_SCHEDULER_CONTEXT_EDF_NAME( name ).Base, \
|
||||
SCHEDULER_EDF_ENTRY_POINTS, \
|
||||
SCHEDULER_EDF_MAXIMUM_PRIORITY, \
|
||||
( obj_name ) \
|
||||
}
|
||||
#endif
|
||||
@@ -107,6 +109,9 @@
|
||||
{ \
|
||||
&RTEMS_SCHEDULER_CONTEXT_PRIORITY_NAME( name ).Base.Base, \
|
||||
SCHEDULER_PRIORITY_ENTRY_POINTS, \
|
||||
RTEMS_ARRAY_SIZE( \
|
||||
RTEMS_SCHEDULER_CONTEXT_PRIORITY_NAME( name ).Ready \
|
||||
) - 1, \
|
||||
( obj_name ) \
|
||||
}
|
||||
#endif
|
||||
@@ -127,6 +132,9 @@
|
||||
{ \
|
||||
&RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP_NAME( name ).Base.Base.Base, \
|
||||
SCHEDULER_PRIORITY_AFFINITY_SMP_ENTRY_POINTS, \
|
||||
RTEMS_ARRAY_SIZE( \
|
||||
RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP_NAME( name ).Ready \
|
||||
) - 1, \
|
||||
( obj_name ) \
|
||||
}
|
||||
#endif
|
||||
@@ -147,6 +155,9 @@
|
||||
{ \
|
||||
&RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP_NAME( name ).Base.Base.Base, \
|
||||
SCHEDULER_PRIORITY_SMP_ENTRY_POINTS, \
|
||||
RTEMS_ARRAY_SIZE( \
|
||||
RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP_NAME( name ).Ready \
|
||||
) - 1, \
|
||||
( obj_name ) \
|
||||
}
|
||||
#endif
|
||||
@@ -167,6 +178,9 @@
|
||||
{ \
|
||||
&RTEMS_SCHEDULER_CONTEXT_STRONG_APA_NAME( name ).Base.Base.Base, \
|
||||
SCHEDULER_STRONG_APA_ENTRY_POINTS, \
|
||||
RTEMS_ARRAY_SIZE( \
|
||||
RTEMS_SCHEDULER_CONTEXT_STRONG_APA_NAME( name ).Ready \
|
||||
) - 1, \
|
||||
( obj_name ) \
|
||||
}
|
||||
#endif
|
||||
@@ -185,6 +199,7 @@
|
||||
{ \
|
||||
&RTEMS_SCHEDULER_CONTEXT_SIMPLE_NAME( name ).Base, \
|
||||
SCHEDULER_SIMPLE_ENTRY_POINTS, \
|
||||
SCHEDULER_SIMPLE_MAXIMUM_PRIORITY, \
|
||||
( obj_name ) \
|
||||
}
|
||||
#endif
|
||||
@@ -203,6 +218,7 @@
|
||||
{ \
|
||||
&RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP_NAME( name ).Base.Base, \
|
||||
SCHEDULER_SIMPLE_SMP_ENTRY_POINTS, \
|
||||
SCHEDULER_SIMPLE_SMP_MAXIMUM_PRIORITY, \
|
||||
( obj_name ) \
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user