summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spsize/size.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-03-16 16:33:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-03-16 16:33:04 +0000
commit5bbc204431e8b2fbec5b06e38434031ed92e1d5c (patch)
tree51570e5b0d54b36bc9285269684a61ccb014d7d9 /testsuites/sptests/spsize/size.c
parent2011-03-16 Jennifer Averett <jennifer.averett@OARcorp.com> (diff)
downloadrtems-5bbc204431e8b2fbec5b06e38434031ed92e1d5c.tar.bz2
2011-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>
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.
Diffstat (limited to 'testsuites/sptests/spsize/size.c')
-rw-r--r--testsuites/sptests/spsize/size.c42
1 files changed, 23 insertions, 19 deletions
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 <rtems/score/prioritybitmap.h>
-
- /* 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 <rtems/score/prioritybitmap.h>
+#include <rtems/score/schedulerpriority.h>
+
+/* 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) + \