From f02ada817bf55b63b62a5c6b91df4bf87f3edef5 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 13 Jun 2008 22:13:44 +0000 Subject: 2008-06-13 Joel Sherrill * minimum/init.c: Add CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION and CONFIGURE_MAXIMUM_PRIORITY. Workspace usage now reduces to 4696 bytes on psim. --- testsuites/samples/ChangeLog | 6 ++++++ testsuites/samples/minimum/init.c | 31 ++++++++++++++++++++++++++++--- 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,3 +1,9 @@ +2008-06-13 Joel Sherrill + + * 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 * minimum/init.c: Exerise new ability for application to configure 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 -- cgit v1.2.3