Modified to use minimum stack size and reserve the necessary amount

of space in the workspace.
This commit is contained in:
Joel Sherrill
1999-11-02 15:19:43 +00:00
parent dee8a5174f
commit f59df6b2ba
10 changed files with 26 additions and 14 deletions

View File

@@ -90,6 +90,7 @@ void destory_all_tasks(
if (task_id[task])
{
printf(" %s : signal task %08x to delete, ", who, task_id[task]);
fflush(stdout);
rtems_event_send(task_id[task], 1);
task_id[task] = 0;
}

View File

@@ -16,9 +16,6 @@
#include <rtems.h>
#define TASK_ALLOCATION_SIZE (5)
#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(TASK_ALLOCATION_SIZE)
#include <tmacros.h>
/* functions */
@@ -50,6 +47,11 @@ void test3();
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define TASK_ALLOCATION_SIZE (5)
#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(TASK_ALLOCATION_SIZE)
#define CONFIGURE_EXTRA_TASK_STACKS (62 * RTEMS_MINIMUM_STACK_SIZE)
#include <confdefs.h>
/* global variables */

View File

@@ -53,7 +53,7 @@ void test1()
result = rtems_task_create(name,
10,
4096,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_ATTRIBUTES,
RTEMS_LOCAL,
&task_id[task_count]);
@@ -63,6 +63,7 @@ void test1()
printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]);
fflush(stdout);
result = rtems_task_start(task_id[task_count],
test_task,
(rtems_task_argument) task_count);

View File

@@ -55,7 +55,7 @@ void test2()
result = rtems_task_create(name,
10,
4096,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_ATTRIBUTES,
RTEMS_LOCAL,
&task_id[task_count]);
@@ -64,6 +64,7 @@ void test2()
break;
printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]);
fflush(stdout);
result = rtems_task_start(task_id[task_count],
test_task,
@@ -148,7 +149,7 @@ void test2()
result = rtems_task_create(name,
10,
4096,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_ATTRIBUTES,
RTEMS_LOCAL,
&task_id[id_slot]);

View File

@@ -63,7 +63,7 @@ void test3()
result = rtems_task_create(name,
10,
4096,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_ATTRIBUTES,
RTEMS_LOCAL,
&task_id[task_count]);
@@ -72,6 +72,7 @@ void test3()
break;
printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]);
fflush(stdout);
result = rtems_task_start(task_id[task_count],
test_task,

View File

@@ -90,6 +90,7 @@ void destory_all_tasks(
if (task_id[task])
{
printf(" %s : signal task %08x to delete, ", who, task_id[task]);
fflush(stdout);
rtems_event_send(task_id[task], 1);
task_id[task] = 0;
}

View File

@@ -16,9 +16,6 @@
#include <rtems.h>
#define TASK_ALLOCATION_SIZE (5)
#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(TASK_ALLOCATION_SIZE)
#include <tmacros.h>
/* functions */
@@ -50,6 +47,11 @@ void test3();
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define TASK_ALLOCATION_SIZE (5)
#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(TASK_ALLOCATION_SIZE)
#define CONFIGURE_EXTRA_TASK_STACKS (62 * RTEMS_MINIMUM_STACK_SIZE)
#include <confdefs.h>
/* global variables */

View File

@@ -53,7 +53,7 @@ void test1()
result = rtems_task_create(name,
10,
4096,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_ATTRIBUTES,
RTEMS_LOCAL,
&task_id[task_count]);
@@ -63,6 +63,7 @@ void test1()
printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]);
fflush(stdout);
result = rtems_task_start(task_id[task_count],
test_task,
(rtems_task_argument) task_count);

View File

@@ -55,7 +55,7 @@ void test2()
result = rtems_task_create(name,
10,
4096,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_ATTRIBUTES,
RTEMS_LOCAL,
&task_id[task_count]);
@@ -64,6 +64,7 @@ void test2()
break;
printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]);
fflush(stdout);
result = rtems_task_start(task_id[task_count],
test_task,
@@ -148,7 +149,7 @@ void test2()
result = rtems_task_create(name,
10,
4096,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_ATTRIBUTES,
RTEMS_LOCAL,
&task_id[id_slot]);

View File

@@ -63,7 +63,7 @@ void test3()
result = rtems_task_create(name,
10,
4096,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_ATTRIBUTES,
RTEMS_LOCAL,
&task_id[task_count]);
@@ -72,6 +72,7 @@ void test3()
break;
printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]);
fflush(stdout);
result = rtems_task_start(task_id[task_count],
test_task,