forked from Imagelibrary/rtems
2002-10-31 Chris Johns <ccj@acm.org>
* unlimited/test1.c: PR296. Only fails if more tasks than allowed can be created. * unlimited/system.h: PR296. Reference the number of tasks in the configuration table rather than a hardcoded number.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2002-10-31 Chris Johns <ccj@acm.org>
|
||||||
|
|
||||||
|
* unlimited/test1.c: PR296. Only fails if more tasks than allowed
|
||||||
|
can be created.
|
||||||
|
* unlimited/system.h: PR296. Reference the number of tasks in the
|
||||||
|
configuration table rather than a hardcoded number.
|
||||||
|
|
||||||
2002-11-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
2002-11-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
* configure.ac: Unconditionally check for CXX (Hack to bug in
|
* configure.ac: Unconditionally check for CXX (Hack to bug in
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ void test3();
|
|||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define TASK_ALLOCATION_SIZE (5)
|
#define TASK_ALLOCATION_SIZE \
|
||||||
|
(rtems_configuration_get_rtems_api_configuration()->maximum_tasks & \
|
||||||
|
~RTEMS_UNLIMITED_OBJECTS)
|
||||||
#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(TASK_ALLOCATION_SIZE)
|
#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(TASK_ALLOCATION_SIZE)
|
||||||
#define CONFIGURE_EXTRA_TASK_STACKS (62 * RTEMS_MINIMUM_STACK_SIZE)
|
#define CONFIGURE_EXTRA_TASK_STACKS (62 * RTEMS_MINIMUM_STACK_SIZE)
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ void test1()
|
|||||||
boolean auto_extend;
|
boolean auto_extend;
|
||||||
rtems_status_code result;
|
rtems_status_code result;
|
||||||
rtems_unsigned32 task_count = 0;
|
rtems_unsigned32 task_count = 0;
|
||||||
|
rtems_unsigned32 expected_count;
|
||||||
Objects_Information *the_information;
|
Objects_Information *the_information;
|
||||||
|
|
||||||
char c1 = 'a';
|
char c1 = 'a';
|
||||||
@@ -45,7 +46,8 @@ void test1()
|
|||||||
_Objects_Information_table[OBJECTS_CLASSIC_API][OBJECTS_RTEMS_TASKS];
|
_Objects_Information_table[OBJECTS_CLASSIC_API][OBJECTS_RTEMS_TASKS];
|
||||||
auto_extend = the_information->auto_extend;
|
auto_extend = the_information->auto_extend;
|
||||||
the_information->auto_extend = FALSE;
|
the_information->auto_extend = FALSE;
|
||||||
|
expected_count = the_information->inactive;
|
||||||
|
|
||||||
while (task_count < MAX_TASKS)
|
while (task_count < MAX_TASKS)
|
||||||
{
|
{
|
||||||
rtems_name name;
|
rtems_name name;
|
||||||
@@ -86,7 +88,7 @@ void test1()
|
|||||||
if (task_count >= MAX_TASKS)
|
if (task_count >= MAX_TASKS)
|
||||||
printf( "\nMAX_TASKS too small for work-space size, please make larger !!\n\n" );
|
printf( "\nMAX_TASKS too small for work-space size, please make larger !!\n\n" );
|
||||||
|
|
||||||
if (task_count != (TASK_ALLOCATION_SIZE - 1)) {
|
if (task_count != expected_count) {
|
||||||
printf( " FAIL1 : the number of tasks does not equal the expected size -\n"
|
printf( " FAIL1 : the number of tasks does not equal the expected size -\n"
|
||||||
" task created = %i, required number = %i\n",
|
" task created = %i, required number = %i\n",
|
||||||
task_count, TASK_ALLOCATION_SIZE);
|
task_count, TASK_ALLOCATION_SIZE);
|
||||||
@@ -99,8 +101,3 @@ void test1()
|
|||||||
|
|
||||||
printf( " TEST1 : completed\n" );
|
printf( " TEST1 : completed\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
2002-10-31 Chris Johns <ccj@acm.org>
|
||||||
|
|
||||||
|
* unlimited/test1.c: PR296. Only fails if more tasks than allowed
|
||||||
|
can be created.
|
||||||
|
* unlimited/system.h: PR296. Reference the number of tasks in the
|
||||||
|
configuration table rather than a hardcoded number.
|
||||||
|
|
||||||
2002-11-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
2002-11-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
* configure.ac: Unconditionally check for CXX (Hack to bug in
|
* configure.ac: Unconditionally check for CXX (Hack to bug in
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ void test3();
|
|||||||
|
|
||||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||||
|
|
||||||
#define TASK_ALLOCATION_SIZE (5)
|
#define TASK_ALLOCATION_SIZE \
|
||||||
|
(rtems_configuration_get_rtems_api_configuration()->maximum_tasks & \
|
||||||
|
~RTEMS_UNLIMITED_OBJECTS)
|
||||||
#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(TASK_ALLOCATION_SIZE)
|
#define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(TASK_ALLOCATION_SIZE)
|
||||||
#define CONFIGURE_EXTRA_TASK_STACKS (62 * RTEMS_MINIMUM_STACK_SIZE)
|
#define CONFIGURE_EXTRA_TASK_STACKS (62 * RTEMS_MINIMUM_STACK_SIZE)
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ void test1()
|
|||||||
boolean auto_extend;
|
boolean auto_extend;
|
||||||
rtems_status_code result;
|
rtems_status_code result;
|
||||||
rtems_unsigned32 task_count = 0;
|
rtems_unsigned32 task_count = 0;
|
||||||
|
rtems_unsigned32 expected_count;
|
||||||
Objects_Information *the_information;
|
Objects_Information *the_information;
|
||||||
|
|
||||||
char c1 = 'a';
|
char c1 = 'a';
|
||||||
@@ -45,7 +46,8 @@ void test1()
|
|||||||
_Objects_Information_table[OBJECTS_CLASSIC_API][OBJECTS_RTEMS_TASKS];
|
_Objects_Information_table[OBJECTS_CLASSIC_API][OBJECTS_RTEMS_TASKS];
|
||||||
auto_extend = the_information->auto_extend;
|
auto_extend = the_information->auto_extend;
|
||||||
the_information->auto_extend = FALSE;
|
the_information->auto_extend = FALSE;
|
||||||
|
expected_count = the_information->inactive;
|
||||||
|
|
||||||
while (task_count < MAX_TASKS)
|
while (task_count < MAX_TASKS)
|
||||||
{
|
{
|
||||||
rtems_name name;
|
rtems_name name;
|
||||||
@@ -86,7 +88,7 @@ void test1()
|
|||||||
if (task_count >= MAX_TASKS)
|
if (task_count >= MAX_TASKS)
|
||||||
printf( "\nMAX_TASKS too small for work-space size, please make larger !!\n\n" );
|
printf( "\nMAX_TASKS too small for work-space size, please make larger !!\n\n" );
|
||||||
|
|
||||||
if (task_count != (TASK_ALLOCATION_SIZE - 1)) {
|
if (task_count != expected_count) {
|
||||||
printf( " FAIL1 : the number of tasks does not equal the expected size -\n"
|
printf( " FAIL1 : the number of tasks does not equal the expected size -\n"
|
||||||
" task created = %i, required number = %i\n",
|
" task created = %i, required number = %i\n",
|
||||||
task_count, TASK_ALLOCATION_SIZE);
|
task_count, TASK_ALLOCATION_SIZE);
|
||||||
@@ -99,8 +101,3 @@ void test1()
|
|||||||
|
|
||||||
printf( " TEST1 : completed\n" );
|
printf( " TEST1 : completed\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user