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/base_mp/system.h | 6 ++-- testsuites/samples/fileio/init.c | 34 +++++++++++----------- testsuites/samples/fileio/system.h | 2 +- testsuites/samples/ticker/system.h | 2 +- testsuites/samples/unlimited/init.c | 22 +++++++------- testsuites/samples/unlimited/test1.c | 28 +++++++++--------- testsuites/samples/unlimited/test2.c | 56 ++++++++++++++++++------------------ testsuites/samples/unlimited/test3.c | 28 +++++++++--------- 8 files changed, 89 insertions(+), 89 deletions(-) (limited to 'testsuites/samples') diff --git a/testsuites/samples/base_mp/system.h b/testsuites/samples/base_mp/system.h index e452c02273..4005a33d7e 100644 --- a/testsuites/samples/base_mp/system.h +++ b/testsuites/samples/base_mp/system.h @@ -26,14 +26,14 @@ rtems_task Application_task( ); /* configuration information */ - + #include /* for device driver prototypes */ #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - + #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c index 344c049540..debb457f5f 100644 --- a/testsuites/samples/fileio/init.c +++ b/testsuites/samples/fileio/init.c @@ -203,12 +203,12 @@ void fileio_list_file(void) flen += n; } } while (n > 0); - + rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &curr_tick); - + printf("\n ******** End of file reached, flen = %d\n",flen); close(fd); - + rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_sec); printf("time elapsed for read: %g seconds\n", ((double)curr_tick-start_tick)/ticks_per_sec); @@ -262,11 +262,11 @@ void fileio_write_file(void) rtems_interval start_tick,curr_tick,ticks_per_sec; char *bufptr = NULL; boolean failed = FALSE; - static const char write_test_string[] = + static const char write_test_string[] = "The quick brown fox jumps over the lazy dog\n"; - static const char write_block_string[] = + static const char write_block_string[] = "\n----- end of write buffer ------\n"; - + printf(" =========================\n"); printf(" WRITE FILE ... \n"); printf(" =========================\n"); @@ -370,7 +370,7 @@ void fileio_write_file(void) printf("... writing to file\n"); rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_tick); curr_pos = 0; - do { + do { bytes_to_copy = buf_size; do { n = write(fd, @@ -422,7 +422,7 @@ void fileio_read_file(void) rtems_interval start_tick,curr_tick,ticks_per_sec; char *bufptr = NULL; boolean failed = FALSE; - + printf(" =========================\n"); printf(" READ FILE ... \n"); printf(" =========================\n"); @@ -489,7 +489,7 @@ void fileio_read_file(void) printf("... reading from file\n"); rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start_tick); curr_pos = 0; - do { + do { n = read(fd, bufptr, buf_size); @@ -511,7 +511,7 @@ void fileio_read_file(void) printf("time elapsed for read: %g seconds\n", ((double)curr_tick-start_tick)/ticks_per_sec); printf("read data rate: %g KBytes/second\n", - (((double)curr_pos) / 1024.0 / + (((double)curr_pos) / 1024.0 / (((double)curr_tick-start_tick)/ticks_per_sec))); } } @@ -554,30 +554,30 @@ void fileio_menu (void) fgets(inbuf,sizeof(inbuf),stdin); switch (inbuf[0]) { case 'l': - fileio_list_file (); + fileio_list_file (); break; case 'r': - fileio_read_file (); + fileio_read_file (); break; case 'w': - fileio_write_file (); + fileio_write_file (); break; case 'p': - fileio_part_table_initialize (); + fileio_part_table_initialize (); break; case 'f': - fileio_fsmount (); + fileio_fsmount (); break; #ifdef USE_SHELL case 's': - fileio_start_shell (); + fileio_start_shell (); break; #endif default: printf("Selection `%c` not implemented\n",inbuf[0]); break; } - + } exit (0); } diff --git a/testsuites/samples/fileio/system.h b/testsuites/samples/fileio/system.h index 310928cdbc..3f1b22ca89 100644 --- a/testsuites/samples/fileio/system.h +++ b/testsuites/samples/fileio/system.h @@ -44,7 +44,7 @@ rtems_driver_address_table Device_drivers[] = #ifdef RTEMS_BSP_HAS_IDE_DRIVER ,IDE_CONTROLLER_DRIVER_TABLE_ENTRY /* important: ATA driver must be after ide drivers */ - ,ATA_DRIVER_TABLE_ENTRY + ,ATA_DRIVER_TABLE_ENTRY #endif }; diff --git a/testsuites/samples/ticker/system.h b/testsuites/samples/ticker/system.h index 6809d79f31..f17d52f279 100644 --- a/testsuites/samples/ticker/system.h +++ b/testsuites/samples/ticker/system.h @@ -29,7 +29,7 @@ rtems_task Test_task( /* * Keep the names and IDs in global variables so another task can use them. - */ + */ extern rtems_id Task_id[ 4 ]; /* array of task ids */ extern rtems_name Task_name[ 4 ]; /* array of task names */ 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