mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-26 14:18:20 +00:00
Modified to use minimum stack size and reserve the necessary amount
of space in the workspace.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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]);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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]);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user