summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuites/samples/ChangeLog6
-rw-r--r--testsuites/samples/minimum/init.c31
2 files changed, 34 insertions, 3 deletions
diff --git a/testsuites/samples/ChangeLog b/testsuites/samples/ChangeLog
index 4666295cb2..dce6b08d36 100644
--- a/testsuites/samples/ChangeLog
+++ b/testsuites/samples/ChangeLog
@@ -1,5 +1,11 @@
2008-06-13 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * minimum/init.c: Add CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION and
+ CONFIGURE_MAXIMUM_PRIORITY. Workspace usage now reduces to 4696 bytes
+ on psim.
+
+2008-06-13 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* minimum/init.c: Exerise new ability for application to configure
minimum stack size. This test still runs the same with a 7.5K stack
on the powerpc but reserves 15K less Workspace on the PowerPC.
diff --git a/testsuites/samples/minimum/init.c b/testsuites/samples/minimum/init.c
index 0d4609f2dc..8a517483e8 100644
--- a/testsuites/samples/minimum/init.c
+++ b/testsuites/samples/minimum/init.c
@@ -16,13 +16,22 @@ rtems_task Init(
rtems_task_argument ignored
)
{
+ rtems_mode mode;
+
+ /* initialize application */
+
+ (void) rtems_task_mode( RTEMS_PREEMPT, RTEMS_PREEMPT_MASK, &mode );
+
+ /* Real application would call idle loop functionality */
+
+ /* but in this case, just return and fall into a fatal error */
}
/* configuration information */
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_MAXIMUM_TASKS 1
-
+/*
+ * This application has no device drivers.
+ */
/* NOTICE: the clock driver is explicitly disabled */
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
@@ -57,6 +66,22 @@ rtems_task Init(
*/
#define CONFIGURE_MINIMUM_TASK_STACK_SIZE 512
+/*
+ * This lowers the number of priorities that this test is able to
+ * use. The Idle task will be running at the lowest priority.
+ */
+#define CONFIGURE_MAXIMUM_PRIORITY 15
+
+/*
+ * In this application, the initialization task performs the system
+ * initialization and then transforms itself into the idle task.
+ */
+#define CONFIGURE_IDLE_TASK_BODY Init
+#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
+
+/*
+ * Instantiate the configuration tables.
+ */
#define CONFIGURE_INIT
#include <rtems/confdefs.h>