summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/scheduler.h
diff options
context:
space:
mode:
authorRichi Dubey <richidubey@gmail.com>2021-06-16 11:30:16 +0530
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-06-24 14:16:21 +0200
commit6c23252cdd8ea63d0fe13d9f99b7befbf070fe80 (patch)
tree67fc1184613942a254d2db601fc99af52cfa7d2a /cpukit/include/rtems/scheduler.h
parentsparc: Simplify trap table initialization (diff)
downloadrtems-6c23252cdd8ea63d0fe13d9f99b7befbf070fe80.tar.bz2
Update Strong APA Scheduler
This change allows for the migration of higher priority tasks on the arrival of a lower priority task limited by affinity constraints. Change license to BSD-2-Clause according to file history and re-licensing agreement. Update #3053.
Diffstat (limited to 'cpukit/include/rtems/scheduler.h')
-rw-r--r--cpukit/include/rtems/scheduler.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/cpukit/include/rtems/scheduler.h b/cpukit/include/rtems/scheduler.h
index 955a83cfb4..76d84fd787 100644
--- a/cpukit/include/rtems/scheduler.h
+++ b/cpukit/include/rtems/scheduler.h
@@ -251,22 +251,24 @@
#ifdef CONFIGURE_SCHEDULER_STRONG_APA
#include <rtems/score/schedulerstrongapa.h>
+ #ifndef CONFIGURE_MAXIMUM_PROCESSORS
+ #error "CONFIGURE_MAXIMUM_PROCESSORS must be defined to configure the Strong APA scheduler"
+ #endif
+
#define SCHEDULER_STRONG_APA_CONTEXT_NAME( name ) \
SCHEDULER_CONTEXT_NAME( strong_APA_ ## name )
#define RTEMS_SCHEDULER_STRONG_APA( name, prio_count ) \
static struct { \
Scheduler_strong_APA_Context Base; \
- Chain_Control Ready[ ( prio_count ) ]; \
+ Scheduler_strong_APA_CPU CPU[ CONFIGURE_MAXIMUM_PROCESSORS ]; \
} SCHEDULER_STRONG_APA_CONTEXT_NAME( name )
#define RTEMS_SCHEDULER_TABLE_STRONG_APA( name, obj_name ) \
{ \
&SCHEDULER_STRONG_APA_CONTEXT_NAME( name ).Base.Base.Base, \
SCHEDULER_STRONG_APA_ENTRY_POINTS, \
- RTEMS_ARRAY_SIZE( \
- SCHEDULER_STRONG_APA_CONTEXT_NAME( name ).Ready \
- ) - 1, \
+ SCHEDULER_STRONG_APA_MAXIMUM_PRIORITY, \
( obj_name ) \
SCHEDULER_CONTROL_IS_NON_PREEMPT_MODE_SUPPORTED( false ) \
}