summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spsize/size.c
diff options
context:
space:
mode:
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) + \