From 8f71a36f710b6196b4854760785c614910da3ff7 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 20 Apr 2004 07:09:31 +0000 Subject: Remove stray white spaces. --- testsuites/samples/unlimited/init.c | 22 +++++++------- testsuites/samples/unlimited/test1.c | 28 +++++++++--------- testsuites/samples/unlimited/test2.c | 56 ++++++++++++++++++------------------ testsuites/samples/unlimited/test3.c | 28 +++++++++--------- 4 files changed, 67 insertions(+), 67 deletions(-) (limited to 'testsuites/samples/unlimited') diff --git a/testsuites/samples/unlimited/init.c b/testsuites/samples/unlimited/init.c index 37a909c52a..9b5f8258d4 100644 --- a/testsuites/samples/unlimited/init.c +++ b/testsuites/samples/unlimited/init.c @@ -40,23 +40,23 @@ rtems_task Init( uint32_t task; /* lower the task priority to allow created tasks to execute */ - + rtems_task_set_priority(RTEMS_SELF, 20, &old_priority); rtems_task_mode(RTEMS_PREEMPT, RTEMS_PREEMPT_MASK, &old_mode); - + printf( "\n*** UNLIMITED TASK TEST ***\n" ); /* * Invalid state if the task id is 0 */ - + for (task = 0; task < MAX_TASKS; task++) task_id[task] = 0; test1(); test2(); test3(); - + printf( "\n*** END OF UNLIMITED TASK TEST ***\n" ); exit( 0 ); } @@ -66,11 +66,11 @@ rtems_task test_task( ) { rtems_event_set out; - + printf( "task %i has started.\n", my_number); rtems_event_receive(1, RTEMS_WAIT | RTEMS_EVENT_ANY, 0, &out); - + printf( "task %i ending.\n", my_number); rtems_task_delete(RTEMS_SELF); @@ -81,11 +81,11 @@ void destory_all_tasks( ) { uint32_t task; - + /* * If the id is not zero, signal the task to delete. */ - + for (task = 0; task < MAX_TASKS; task++) if (task_id[task]) { @@ -103,15 +103,15 @@ boolean status_code_bad( if (status_code != RTEMS_SUCCESSFUL) { printf("failure, "); - + if (status_code == RTEMS_TOO_MANY) { - printf("too many.\n"); + printf("too many.\n"); return TRUE; } if (status_code == RTEMS_UNSATISFIED) { - printf("unsatisfied.\n"); + printf("unsatisfied.\n"); return TRUE; } diff --git a/testsuites/samples/unlimited/test1.c b/testsuites/samples/unlimited/test1.c index 129e1635e5..c676faf7bb 100644 --- a/testsuites/samples/unlimited/test1.c +++ b/testsuites/samples/unlimited/test1.c @@ -28,12 +28,12 @@ void test1() rtems_status_code result; uint32_t task_count = 0; Objects_Information *the_information; - + char c1 = 'a'; char c2 = 'a'; char c3 = '0'; char c4 = '0'; - + printf( "\n TEST1 : auto-extend disabled.\n" ); /* @@ -41,17 +41,17 @@ void test1() * saves having another test. */ - the_information = + the_information = _Objects_Information_table[OBJECTS_CLASSIC_API][OBJECTS_RTEMS_TASKS]; auto_extend = the_information->auto_extend; the_information->auto_extend = FALSE; - + while (task_count < MAX_TASKS) { rtems_name name; printf(" TEST1 : creating task '%c%c%c%c', ", c1, c2, c3, c4); - + name = rtems_build_name(c1, c2, c3, c4); result = rtems_task_create(name, @@ -63,29 +63,29 @@ void test1() if (status_code_bad(result)) 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, (rtems_task_argument) task_count); - + if (status_code_bad(result)) break; - + /* * Update the name. */ - + NEXT_TASK_NAME(c1, c2, c3, c4); - + task_count++; } if (task_count >= MAX_TASKS) printf( "\nMAX_TASKS too small for work-space size, please make larger !!\n\n" ); - + if (task_count != (TASK_ALLOCATION_SIZE - 1)) { printf( " FAIL1 : the number of tasks does not equal the expected size -\n" " task created = %i, required number = %i\n", @@ -94,8 +94,8 @@ void test1() } destory_all_tasks("TEST1"); - + the_information->auto_extend = auto_extend; - + printf( " TEST1 : completed\n" ); } diff --git a/testsuites/samples/unlimited/test2.c b/testsuites/samples/unlimited/test2.c index 3416c1532b..0491e84ae6 100644 --- a/testsuites/samples/unlimited/test2.c +++ b/testsuites/samples/unlimited/test2.c @@ -32,25 +32,25 @@ void test2() uint32_t block; uint32_t task_count = 0; rtems_id removed_ids[TASK_ALLOCATION_SIZE * 2]; - + char c1 = 'a'; char c2 = 'a'; char c3 = '0'; char c4 = '0'; - + printf( "\n TEST2 : re-allocate of index numbers, and a block free'ed and one inactive\n" ); /* * Allocate enought tasks so the Inactive list is empty. Remember * to count the Init task, ie ... - 1. */ - + while (task_count < ((TASK_ALLOCATION_SIZE * 5) - TASK_INDEX_OFFSET)) { rtems_name name; printf(" TEST2 : creating task '%c%c%c%c', ", c1, c2, c3, c4); - + name = rtems_build_name(c1, c2, c3, c4); result = rtems_task_create(name, @@ -62,23 +62,23 @@ void test2() if (status_code_bad(result)) 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, (rtems_task_argument) task_count); - + if (status_code_bad(result)) break; - + /* * Update the name. */ - + NEXT_TASK_NAME(c1, c2, c3, c4); - + task_count++; } @@ -95,7 +95,7 @@ void test2() } task = 0; - + for (block = 1; block < 4; block += 2) { for (remove_task = (block * TASK_ALLOCATION_SIZE) - TASK_INDEX_OFFSET; @@ -114,9 +114,9 @@ void test2() /* * Save the id's to match them against the reallocated ids */ - + removed_ids[task++] = task_id[remove_task]; - + printf(" TEST2 : block %i remove, signal task %08x, ", block, task_id[remove_task]); rtems_event_send(task_id[remove_task], 1); task_id[remove_task] = 0; @@ -135,7 +135,7 @@ void test2() for (id_slot = 0; id_slot < MAX_TASKS; id_slot++) if (!task_id[id_slot]) break; - + if (id_slot == MAX_TASKS) { printf( " FAIL2 : no free task id slot.\n"); @@ -144,7 +144,7 @@ void test2() } printf(" TEST2 : creating task '%c%c%c%c', ", c1, c2, c3, c4); - + name = rtems_build_name(c1, c2, c3, c4); result = rtems_task_create(name, @@ -153,7 +153,7 @@ void test2() RTEMS_DEFAULT_ATTRIBUTES, RTEMS_LOCAL, &task_id[id_slot]); - + if (status_code_bad(result)) { printf( " FAIL2 : re-creating a task -\n" @@ -162,13 +162,13 @@ void test2() destory_all_tasks("TEST2"); exit( 1 ); } - + printf("number = %3i, id = %08x, starting, ", task_count, task_id[id_slot]); - + result = rtems_task_start(task_id[id_slot], test_task, (rtems_task_argument) task_count); - + if (status_code_bad(result)) { printf( " FAIL : re-starting a task -\n" @@ -177,17 +177,17 @@ void test2() destory_all_tasks("TEST2"); exit( 1 ); } - + /* * Update the name. */ - + NEXT_TASK_NAME(c1, c2, c3, c4); - + /* * Search the removed ids to see if it existed, clear the removed id when found */ - + for (remove_task = 0; remove_task < (TASK_ALLOCATION_SIZE * 2); remove_task++) if (removed_ids[remove_task] == task_id[id_slot]) { @@ -199,11 +199,11 @@ void test2() * If not located in the removed id table, check and make sure it is not * already allocated */ - + if (remove_task == (TASK_ALLOCATION_SIZE * 2)) { uint32_t allocated_id; - + for (allocated_id = 0; allocated_id < MAX_TASKS; allocated_id++) if ((task_id[id_slot] == task_id[allocated_id]) && (id_slot != allocated_id)) { @@ -212,7 +212,7 @@ void test2() task_id[id_slot]); exit( 1 ); } - + printf( " FAIL2 : could not find the task id in the removed table -\n" " task id = %08x\n", task_id[id_slot]); @@ -221,8 +221,8 @@ void test2() task_count++; } - + destory_all_tasks("TEST2"); - + printf( " TEST2 : completed\n" ); } diff --git a/testsuites/samples/unlimited/test3.c b/testsuites/samples/unlimited/test3.c index 5ae799066f..ad2ca95e72 100644 --- a/testsuites/samples/unlimited/test3.c +++ b/testsuites/samples/unlimited/test3.c @@ -30,12 +30,12 @@ void test3() uint32_t remove_task; uint32_t block; uint32_t task_count = 0; - + char c1 = 'a'; char c2 = 'a'; char c3 = '0'; char c4 = '0'; - + printf( "\n TEST3 : free more than 3 x allocation size, but not the same block,\n" " then free a block\n"); @@ -48,17 +48,17 @@ void test3() printf( " FAIL3 : task allocation size must be greater than 4.\n"); exit( 1 ); } - + /* * Allocate as many tasks as possible. */ - + while (task_count < MAX_TASKS) { rtems_name name; printf(" TEST3 : creating task '%c%c%c%c', ", c1, c2, c3, c4); - + name = rtems_build_name(c1, c2, c3, c4); result = rtems_task_create(name, @@ -70,23 +70,23 @@ void test3() if (status_code_bad(result)) 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, (rtems_task_argument) task_count); - + if (status_code_bad(result)) break; - + /* * Update the name. */ - + NEXT_TASK_NAME(c1, c2, c3, c4); - + task_count++; } @@ -127,7 +127,7 @@ void test3() * Remove a complete block, not the first, forces a scan of the blocks in the * allocator's free routine */ - + for (remove_task = (TASK_ALLOCATION_SIZE - TASK_INDEX_OFFSET); remove_task < ((TASK_ALLOCATION_SIZE * 2) - - TASK_INDEX_OFFSET); remove_task++) @@ -139,8 +139,8 @@ void test3() task_id[remove_task] = 0; } } - + destory_all_tasks("TEST3"); - + printf( " TEST3 : completed\n" ); } -- cgit v1.2.3