From 5bbc204431e8b2fbec5b06e38434031ed92e1d5c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 16 Mar 2011 16:33:04 +0000 Subject: 2011-03-16 Jennifer Averett PR 1743/cpu * Makefile.am, configure.ac, spsize/size.c: Add Simple Priority Scheduler as complement to existing Deterministic Priority Scheduler. This scheduler serves both as an example and as a lighter weight implementation for smaller systems. * spsimplesched01/.cvsignore, spsimplesched01/Makefile.am, spsimplesched01/init.c, spsimplesched01/spsimplesched01.doc, spsimplesched01/spsimplesched01.scn, spsimplesched02/.cvsignore, spsimplesched02/Makefile.am, spsimplesched02/init.c, spsimplesched02/spsimplesched02.doc, spsimplesched02/spsimplesched02.scn, spsimplesched03/.cvsignore, spsimplesched03/Makefile.am, spsimplesched03/init.c, spsimplesched03/spsimplesched03.doc, spsimplesched03/spsimplesched03.scn: New files. --- testsuites/sptests/spsize/size.c | 42 ++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'testsuites/sptests/spsize/size.c') diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c index bd14268f7e..9ecc1c13d3 100644 --- a/testsuites/sptests/spsize/size.c +++ b/testsuites/sptests/spsize/size.c @@ -72,26 +72,30 @@ void print_formula(void); #define HEAP_OVHD 16 /* wasted heap space per task stack */ #define NAME_PTR_SIZE 8 /* size of name and pointer table entries */ -#if CONFIGURE_SCHEDULER_POLICY == _Scheduler_PRIORITY - #include - - /* Priority scheduling uninitialized (globals) consumption */ - #define SCHEDULER_OVHD ((sizeof _Scheduler) + \ - (sizeof _Priority_Major_bit_map) + \ - (sizeof _Priority_Bit_map)) - - /* Priority scheduling per-thread consumption. Gets - * included in the PER_TASK consumption. */ - #define SCHEDULER_TASK_WKSP (sizeof(Scheduler_priority_Per_thread)) - - /* Priority scheduling workspace consumption - * - * Include allocation of ready queue. Pointers are already counted by - * including _Scheduler in SCHEDULER_OVHD. - */ - #define SCHEDULER_WKSP_SIZE \ +/* + * This assumes the default Priority Scheduler + */ +#include +#include + +/* Priority scheduling uninitialized (globals) consumption */ +#define SCHEDULER_OVHD ((sizeof _Scheduler) + \ + (sizeof _Priority_Major_bit_map) + \ + (sizeof _Priority_Bit_map)) + +/* Priority scheduling per-thread consumption. Gets + * included in the PER_TASK consumption. + */ +#define SCHEDULER_TASK_WKSP (sizeof(Scheduler_priority_Per_thread)) + +/* Priority scheduling workspace consumption + * + * Include allocation of ready queue. Pointers are already counted by + * including _Scheduler in SCHEDULER_OVHD. + */ +#define SCHEDULER_WKSP_SIZE \ ((RTEMS_MAXIMUM_PRIORITY + 1) * sizeof(Chain_Control )) -#endif +/****** END OF MEMORY USAGE OF DEFAULT PRIORITY SCHEDULER ******/ #define PER_TASK \ (long) (sizeof (Thread_Control) + \ -- cgit v1.2.3