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/automake/compile.am | 14 +-- testsuites/automake/host.am | 4 +- testsuites/automake/leaf.am | 1 - testsuites/automake/subdirs.am | 6 +- testsuites/libtests/cpuuse/init.c | 2 +- testsuites/libtests/cpuuse/system.h | 12 +-- testsuites/libtests/cpuuse/tswitch.c | 2 +- testsuites/libtests/monitor/init.c | 2 +- testsuites/libtests/monitor/system.h | 6 +- testsuites/libtests/rtems++/System.h | 12 +-- testsuites/libtests/rtmonuse/system.h | 6 +- testsuites/libtests/termios/init.c | 162 ++++++++++++++-------------- testsuites/mptests/mp01/system.h | 6 +- testsuites/mptests/mp02/system.h | 6 +- testsuites/mptests/mp03/system.h | 12 +-- testsuites/mptests/mp04/system.h | 6 +- testsuites/mptests/mp05/system.h | 12 +-- testsuites/mptests/mp06/system.h | 8 +- testsuites/mptests/mp07/system.h | 8 +- testsuites/mptests/mp08/system.h | 6 +- testsuites/mptests/mp09/system.h | 8 +- testsuites/mptests/mp10/system.h | 12 +-- testsuites/mptests/mp11/system.h | 8 +- testsuites/mptests/mp12/system.h | 6 +- testsuites/mptests/mp13/system.h | 6 +- testsuites/mptests/mp14/exit.c | 4 +- testsuites/mptests/mp14/system.h | 6 +- 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 ++--- testsuites/support/include/buffer_test_io.h | 12 +-- testsuites/support/include/tmacros.h | 6 +- testsuites/tmitrontests/include/timesys.h | 2 +- testsuites/tmitrontests/tmitronsem01/init.c | 6 +- testsuites/tmtests/tm01/system.h | 4 +- testsuites/tmtests/tm02/system.h | 4 +- testsuites/tmtests/tm03/system.h | 4 +- testsuites/tmtests/tm04/system.h | 4 +- testsuites/tmtests/tm05/system.h | 4 +- testsuites/tmtests/tm06/system.h | 4 +- testsuites/tmtests/tm07/system.h | 4 +- testsuites/tmtests/tm08/system.h | 4 +- testsuites/tmtests/tm09/system.h | 4 +- testsuites/tmtests/tm10/system.h | 4 +- testsuites/tmtests/tm10/task1.c | 4 +- testsuites/tmtests/tm11/system.h | 4 +- testsuites/tmtests/tm11/task1.c | 2 +- testsuites/tmtests/tm12/system.h | 4 +- testsuites/tmtests/tm13/system.h | 4 +- testsuites/tmtests/tm14/system.h | 4 +- testsuites/tmtests/tm15/system.h | 4 +- testsuites/tmtests/tm16/system.h | 4 +- testsuites/tmtests/tm17/system.h | 4 +- testsuites/tmtests/tm18/system.h | 4 +- testsuites/tmtests/tm19/system.h | 4 +- testsuites/tmtests/tm20/system.h | 4 +- testsuites/tmtests/tm21/system.h | 4 +- testsuites/tmtests/tm22/system.h | 4 +- testsuites/tmtests/tm23/system.h | 4 +- testsuites/tmtests/tm24/system.h | 4 +- testsuites/tmtests/tm25/system.h | 4 +- testsuites/tmtests/tm26/system.h | 4 +- testsuites/tmtests/tm26/task1.c | 10 +- testsuites/tmtests/tm27/system.h | 4 +- testsuites/tmtests/tm27/task1.c | 8 +- testsuites/tmtests/tm28/system.h | 4 +- testsuites/tmtests/tm29/system.h | 4 +- testsuites/tmtests/tmck/system.h | 4 +- testsuites/tmtests/tmck/task1.c | 6 +- testsuites/tmtests/tmoverhd/system.h | 14 +-- tools/build/binpatch.c | 12 +-- tools/build/packhex.c | 2 +- tools/build/unhex.c | 2 +- tools/cpu/sh/sci.c | 38 +++---- tools/cpu/sh/shgen.c | 16 +-- 80 files changed, 390 insertions(+), 391 deletions(-) diff --git a/testsuites/automake/compile.am b/testsuites/automake/compile.am index 022b5ecf06..1306f7b43b 100644 --- a/testsuites/automake/compile.am +++ b/testsuites/automake/compile.am @@ -3,7 +3,7 @@ ## ## ------------------------------------------------------------------------- -## NOTE: This file is rather immature and has to be considered to be +## NOTE: This file is rather immature and has to be considered to be ## almost experimental. ## ## Expect frequent changes -- It deserves to be cleaned up :( @@ -12,7 +12,7 @@ ## The section below is based on make/compilers/gcc-target-default.cfg ## used in former versions of RTEMS. -## +## ## Set up the flags for the toolchains: ## ## We are considering 3 different building schemes here: @@ -24,19 +24,19 @@ ## Automake conditionals in use: ## RTEMS_USE_GCC .. if we are using GCC -## NOTES: +## NOTES: ## * The gcc-2.8 building scheme is the nominal building scheme and ## is actively supported. -## * The non-gcc building scheme requires manually setting up environment +## * The non-gcc building scheme requires manually setting up environment ## variables and is hardly tested at all ## CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V are the values we ## would want the corresponding macros to be set to. ## -## CFLAGS_OPTIMIZE, CFLAGS_DEBUG are set by the +## CFLAGS_OPTIMIZE, CFLAGS_DEBUG are set by the ## 'VARIANT=' targets to their _V values. -## XCPPFLAGS, XCFLAGS, XCXXFLAGS, XASFLAGS +## XCPPFLAGS, XCFLAGS, XCXXFLAGS, XASFLAGS ## are used to add flags from the shell ## cf. make.info ("Implicit rules/variables" for details) @@ -127,7 +127,7 @@ depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES) -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp mv $(DEPEND).tmp $(DEPEND) -# pull in dependencies if they exist +# pull in dependencies if they exist ifeq (${DEPEND},$(wildcard ${DEPEND})) include ${DEPEND} @ENDIF@ diff --git a/testsuites/automake/host.am b/testsuites/automake/host.am index b7033e3df0..f87e6a41ee 100644 --- a/testsuites/automake/host.am +++ b/testsuites/automake/host.am @@ -1,8 +1,8 @@ ## $Id$ -## NOTE: This is a temporary work-around to keep +## NOTE: This is a temporary work-around to keep ## RTEMS's non automake standard make targets working. -## Once automake is fully integrated these make targets +## Once automake is fully integrated these make targets ## and this file will probably be removed preinstall-am: $(PREINSTALL_FILES) diff --git a/testsuites/automake/leaf.am b/testsuites/automake/leaf.am index f6a9c5ce15..893f8fec56 100644 --- a/testsuites/automake/leaf.am +++ b/testsuites/automake/leaf.am @@ -13,4 +13,3 @@ define make-exe $(LINK_APP) endef @ENDIF@ - diff --git a/testsuites/automake/subdirs.am b/testsuites/automake/subdirs.am index 3d54285dec..62823202ee 100644 --- a/testsuites/automake/subdirs.am +++ b/testsuites/automake/subdirs.am @@ -1,10 +1,10 @@ ## $Id$ -## Borrowed from automake-1.4 and adapted to RTEMS +## Borrowed from automake-1.4 and adapted to RTEMS -## NOTE: This is a temporary work-around to keep +## NOTE: This is a temporary work-around to keep ## RTEMS's non automake standard make targets working. -## Once automake is fully integrated these make targets +## Once automake is fully integrated these make targets ## and this file will probably be removed depend-recursive \ diff --git a/testsuites/libtests/cpuuse/init.c b/testsuites/libtests/cpuuse/init.c index eeebe08586..00af89c553 100644 --- a/testsuites/libtests/cpuuse/init.c +++ b/testsuites/libtests/cpuuse/init.c @@ -1,4 +1,4 @@ -/* +/* * This is a clone of sp04 which has been modified to use the cpu monitoring * library. * diff --git a/testsuites/libtests/cpuuse/system.h b/testsuites/libtests/cpuuse/system.h index 8b62b327d8..8e7b206e33 100644 --- a/testsuites/libtests/cpuuse/system.h +++ b/testsuites/libtests/cpuuse/system.h @@ -24,15 +24,15 @@ rtems_task Init( rtems_task Task_1( rtems_task_argument argument ); - + rtems_task Task_2( rtems_task_argument argument ); - + rtems_task Task_3( rtems_task_argument argument ); - + void Task_switch( rtems_tcb *unused, rtems_tcb *heir @@ -60,9 +60,9 @@ TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */ TEST_EXTERN rtems_id Extension_id[ 4 ]; TEST_EXTERN rtems_name Extension_name[ 4 ]; /* array of task names */ - + /* array of task run counts */ -TEST_EXTERN volatile uint32_t Run_count[ 4 ]; +TEST_EXTERN volatile uint32_t Run_count[ 4 ]; /* * Keep track of task switches @@ -77,5 +77,5 @@ extern struct taskSwitchLog taskSwitchLog[]; extern int taskSwitchLogIndex; volatile extern int testsFinished; - + /* end of include file */ diff --git a/testsuites/libtests/cpuuse/tswitch.c b/testsuites/libtests/cpuuse/tswitch.c index 3f1e999c7f..e84c878b0c 100644 --- a/testsuites/libtests/cpuuse/tswitch.c +++ b/testsuites/libtests/cpuuse/tswitch.c @@ -26,7 +26,7 @@ struct taskSwitchLog taskSwitchLog[1000]; int taskSwitchLogIndex; volatile int testsFinished;; -rtems_extension Task_switch( +rtems_extension Task_switch( rtems_tcb *unused, rtems_tcb *heir ) diff --git a/testsuites/libtests/monitor/init.c b/testsuites/libtests/monitor/init.c index 88920e6c0d..c2bc1e8734 100644 --- a/testsuites/libtests/monitor/init.c +++ b/testsuites/libtests/monitor/init.c @@ -1,7 +1,7 @@ /* * This is a simple test whose only purpose is to start the Monitor * task. The Monitor task can be used to obtain information about - * a variety of RTEMS objects. + * a variety of RTEMS objects. * * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). diff --git a/testsuites/libtests/monitor/system.h b/testsuites/libtests/monitor/system.h index 57f3175b5c..5960070e89 100644 --- a/testsuites/libtests/monitor/system.h +++ b/testsuites/libtests/monitor/system.h @@ -26,13 +26,13 @@ struct counters { rtems_task Init( rtems_task_argument argument ); - + rtems_task Task_1_through_5( rtems_task_argument argument ); - + void Get_all_counters( void ); - + /* configuration information */ #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER diff --git a/testsuites/libtests/rtems++/System.h b/testsuites/libtests/rtems++/System.h index 9cfe1950fb..309a0094e4 100644 --- a/testsuites/libtests/rtems++/System.h +++ b/testsuites/libtests/rtems++/System.h @@ -22,7 +22,7 @@ /* functions */ extern "C" -{ +{ rtems_task Init( rtems_task_argument argument ); @@ -37,7 +37,7 @@ class Task1 : public rtemsTask { void print_mode(rtems_mode mode, rtems_mode mask); - + void screen1(void); void screen2(void); void screen3(void); @@ -59,7 +59,7 @@ class Task2 protected: virtual void body(rtems_task_argument argument); -public: +public: Task2(const char* name, const rtems_task_priority initial_priority, const uint32_t stack_size); @@ -73,7 +73,7 @@ class Task3 protected: virtual void body(rtems_task_argument argument); -public: +public: Task3(const char* name, const rtems_task_priority initial_priority, const uint32_t stack_size); @@ -85,7 +85,7 @@ class EndTask protected: virtual void body(rtems_task_argument argument); -public: +public: EndTask(const char* name, const rtems_task_priority initial_priority, const uint32_t stack_size); @@ -126,7 +126,7 @@ class Io_during_interrupt #define CONFIGURE_TICKS_PER_TIMESLICE 100 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_INIT_TASK_STACK_SIZE (4 * RTEMS_MINIMUM_STACK_SIZE) +#define CONFIGURE_INIT_TASK_STACK_SIZE (4 * RTEMS_MINIMUM_STACK_SIZE) #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) diff --git a/testsuites/libtests/rtmonuse/system.h b/testsuites/libtests/rtmonuse/system.h index 1027fe0daf..742fc56a0c 100644 --- a/testsuites/libtests/rtmonuse/system.h +++ b/testsuites/libtests/rtmonuse/system.h @@ -26,13 +26,13 @@ struct counters { rtems_task Init( rtems_task_argument argument ); - + rtems_task Task_1_through_5( rtems_task_argument argument ); - + void Get_all_counters( void ); - + /* configuration information */ #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER diff --git a/testsuites/libtests/termios/init.c b/testsuites/libtests/termios/init.c index 8f583dea4f..1511899af0 100644 --- a/testsuites/libtests/termios/init.c +++ b/testsuites/libtests/termios/init.c @@ -1,6 +1,6 @@ /* * RTEMS configuration/initialization - * + * * This program may be distributed and used for any purpose. * I ask only that you: * 1. Leave this author information intact. @@ -11,7 +11,7 @@ * University of Saskatchewan * Saskatoon, Saskatchewan, CANADA * eric@skatter.usask.ca - * + * * Additions: * Charles-Antoine Gauthier * Software Engineering Group @@ -103,25 +103,25 @@ void print_c_oflag( struct termios * tp ) if( tp->c_oflag & OPOST ) printf( "OPOST " ); - + if( tp->c_oflag & OLCUC ) printf( "OLCUC " ); - + if( tp->c_oflag & ONLCR ) printf( "ONLCR " ); - + if( tp->c_oflag & OCRNL ) printf( "OCRNL " ); - + if( tp->c_oflag & ONOCR ) printf( "ONOCR " ); - + if( tp->c_oflag & ONLRET ) printf( "ONLRET " ); - + if( tp->c_oflag & OFILL ) printf( "OFILL " ); - + if( tp->c_oflag & OFDEL ) printf( "OFDEL " ); @@ -129,73 +129,73 @@ void print_c_oflag( struct termios * tp ) case NL0: printf( "NL0 " ); break; - + case NL1: printf( "NL1 " ); break; } - + switch( tp->c_oflag & CRDLY ) { case CR0: printf( "CR0 " ); break; - + case CR1: printf( "CR1 " ); break; - + case CR2: printf( "CR2 " ); break; - + case CR3: printf( "CR3 " ); break; } - + switch( tp->c_oflag & TABDLY ) { case TAB0: printf( "TAB0 " ); break; - + case TAB1: printf( "TAB1 " ); break; - + case TAB2: printf( "TAB2 " ); break; - + case TAB3: printf( "TAB3 " ); break; } - + switch( tp->c_oflag & BSDLY ) { case BS0: printf( "BS0 " ); break; - + case BS1: printf( "BS1 " ); break; } - + switch( tp->c_oflag & VTDLY ) { case VT0: printf( "VT0 " ); break; - + case VT1: printf( "VT1 " ); break; } - + switch( tp->c_oflag & FFDLY ) { case FF0: printf( "FF0" ); break; - + case FF1: printf( "FF1" ); break; @@ -229,7 +229,7 @@ void print_c_lflag( struct termios * tp ) "unknown", /* 2000000 */ "unknown", /* 4000000 */ }; - + printf( "c_lflag = 0x%08x\n\t", tp->c_lflag ); print_32bits( tp->c_lflag, sizeof( c_lflag_bits )/sizeof( char * ), c_lflag_bits ); printf( "\n" ); @@ -239,99 +239,99 @@ void print_c_lflag( struct termios * tp ) void print_c_cflag( struct termios * tp ) { unsigned int baud; - + printf( "c_cflag = 0x%08x\n", tp->c_cflag ); baud = (tp->c_cflag & CBAUD) ; -#if defined(__sh2__) +#if defined(__sh2__) if ( tp->c_cflag & CBAUDEX ) #endif switch( baud ) { case B0: printf( "\tCBAUD =\tB0\n" ); break; - + case B50: printf( "\tCBAUD =\tB50\n" ); break; - + case B75: printf( "\tCBAUD =\tB75\n" ); break; - + case B110: printf( "\tCBAUD =\tB110\n" ); break; - + case B134: printf( "\tCBAUD =\tB134\n" ); break; - + case B150: printf( "\tCBAUD =\tB150\n" ); break; - + case B200: printf( "\tCBAUD =\tB200\n" ); break; - + case B300: printf( "\tCBAUD =\tB300\n" ); break; - + case B600: printf( "\tCBAUD =\tB600\n" ); break; - + case B1200: printf( "\tCBAUD =\tB1200\n" ); break; - + case B1800: printf( "\tCBAUD =\tB1800\n" ); break; - + case B2400: printf( "\tCBAUD =\tB2400\n" ); break; - + case B4800: printf( "\tCBAUD =\tB4800\n" ); break; - + case B9600: printf( "\tCBAUD =\tB9600\n" ); break; - + case B19200: printf( "\tCBAUD =\tB19200\n" ); break; - + case B38400: printf( "\tCBAUD =\tB38400\n" ); break; #if defined(__sh2__) - } - else - switch ( baud ) + } + else + switch ( baud ) { #endif case B57600: printf( "\tCBAUD =\tB57600\n" ); break; - + case B115200: printf( "\tCBAUD =\tB115200\n" ); break; - + case B230400: printf( "\tCBAUD =\tB230400\n" ); break; - + case B460800: printf( "\tCBAUD =\tB460800\n" ); break; - + default: printf( "\tCBAUD =\tunknown (0x%08x)\n", baud ); break; @@ -341,15 +341,15 @@ void print_c_cflag( struct termios * tp ) case CS5: printf( "\tCSIZE =\tCS5\n" ); break; - + case CS6: printf( "\tCSIZE =\tCS6\n" ); break; - + case CS7: printf( "\tCSIZE =\tCS7\n" ); break; - + case CS8: printf( "\tCSIZE =\tCS8\n" ); break; @@ -359,39 +359,39 @@ void print_c_cflag( struct termios * tp ) printf( "\tCSTOPB set: send 2 stop bits\n" ); else printf( "\tCSTOPB clear: send 1 stop bit\n" ); - + if( tp->c_cflag & PARENB ) printf( "\tPARENB set: parity enabled\n" ); else printf( "\tPARENB clear: parity disabled\n" ); - + if( tp->c_cflag & PARODD ) printf( "\tPARODD set: parity odd\n" ); else printf( "\tPARODD clear: parity even\n" ); - + if( tp->c_cflag & CREAD ) printf( "\tCREAD set: receiver enabled\n" ); else printf( "\tCREAD clear: treceiver disabled\n" ); - + if( tp->c_cflag & HUPCL ) printf( "\tHUPCL set: enabled\n" ); else printf( "\tHUPCL clear: disabled\n" ); - + if( tp->c_cflag & CLOCAL ) printf( "\tCLOCAL set: ignore modem lines\n" ); else printf( "\tCLOCAL clear: don't ignore modem lines\n" ); - + #if defined(CBAUDEX) if( tp->c_cflag & CBAUDEX ) printf( "\tCBAUDEX set: What does this do?\n" ); else printf( "\tCBAUDEX clear: What does this do?\n" ); #endif - + if( tp->c_cflag & CRTSCTS ) printf( "\tCRTSCTS: harware flow control enabled?\n" ); else @@ -445,7 +445,7 @@ void print_termios( struct termios *tp ) unsigned long get_baud_rate( void ) { unsigned long baud_rate; - + while( TRUE ) { printf( "Enter the numerical value for the new baud rate.\n" ); printf( "Choices are: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800\n" ); @@ -485,7 +485,7 @@ unsigned long get_baud_rate( void ) unsigned long get_parity() { int parity; - + while( TRUE ) { printf( "Enter the numerical value for the new parity\n" ); printf( "Choices are: 0 for no parity, 1 for even parity, 2 for odd parity\n" ); @@ -523,7 +523,7 @@ unsigned long get_stop_bits() switch( stop_bits ) { case 1: return 0; - + case 2: return CSTOPB; @@ -548,13 +548,13 @@ unsigned long get_data_bits() switch( data_bits ) { case 5: return CS5; - + case 6: return CS6; - + case 7: return CS7; - + case 8: return CS8; @@ -569,9 +569,9 @@ unsigned long get_data_bits() void change_line_settings( struct termios *tp ) { unsigned long baud_rate, parity, stop_bits, data_bits, sleep_time; - + printf( "\nSetting line characteristics\n\n" ); - + baud_rate = get_baud_rate(); parity = get_parity(); stop_bits = get_stop_bits(); @@ -587,7 +587,7 @@ void change_line_settings( struct termios *tp ) printf( "Setting line to new termios settings in %lu seconds.\n", sleep_time ); sleep( sleep_time ); - + tp->c_cflag = CLOCAL | CREAD | parity | stop_bits | data_bits | baud_rate; if( tcsetattr( fileno( stdin ), TCSADRAIN, tp ) < 0 ) { perror( "change_line_settings(): tcsetattr() failed" ); @@ -600,17 +600,17 @@ void change_line_settings( struct termios *tp ) void canonical_input( struct termios *tp ) { char c, first_time = TRUE; - + printf( "\nTesting canonical input\n\n" ); printf( "Setting line to canonical input mode.\n" ); - tp->c_lflag = ISIG | ICANON | ECHO | ECHONL | ECHOK | ECHOE | ECHOPRT | ECHOCTL | IEXTEN; + tp->c_lflag = ISIG | ICANON | ECHO | ECHONL | ECHOK | ECHOE | ECHOPRT | ECHOCTL | IEXTEN; tp->c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; if( tcsetattr( fileno( stdin ), TCSADRAIN, tp ) < 0 ) { perror( "canonical_input(): tcsetattr() failed" ); rtems_test_exit( 1 ); } - + while ( ( c = getchar () ) != '\n'); printf( "Testing getchar(). Type some text followed by carriage return\n" ); printf( "Each character you entered will be echoed back to you\n\n" ); @@ -639,13 +639,13 @@ void do_raw_input( int vmin, int vtime ) unsigned char cbuf[100]; printf( "Raw input test with VMIN=%d VTIME=%d\n", vmin, vtime ); - + rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond ); if ( tcgetattr( fileno ( stdin ), &old ) < 0 ) { perror( "do_raw_input(): tcgetattr() failed" ); return; } - + new = old; new.c_lflag &= ~( ICANON | ECHO | ECHONL | ECHOK | ECHOE | ECHOPRT | ECHOCTL ); new.c_cc[VMIN] = vmin; @@ -654,7 +654,7 @@ void do_raw_input( int vmin, int vtime ) perror ("do_raw_input(): tcsetattr() failed" ); return; } - + do { rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then ); count = 0; @@ -672,17 +672,17 @@ void do_raw_input( int vmin, int vtime ) msec = (now - then) * 1000 / ticksPerSecond; printf( "Count:%-10lu Interval:%3u.%3.3d Char:", count, msec / 1000, msec % 1000 ); - + for( i = 0 ; i < nread ; i++ ) printf (" 0x%2.2x", cbuf[i]); printf ("\n"); - + } while( cbuf[0] != 'q' ); - + out: if( tcsetattr( fileno( stdin ), TCSADRAIN, &old) < 0 ) perror("do_raw_input(): tcsetattr() failed: %s\n" ); - + printf ("*** End of Raw input VMIN=%d VTIME=%d ***\n", vmin, vtime); } @@ -696,7 +696,7 @@ static void raw_input( struct termios *tp ) do_raw_input( 0, 20 ); do_raw_input( 5, 0 ); do_raw_input( 5, 20 ); - + printf( "\nRaw input test done.\n" ); } @@ -722,7 +722,7 @@ Init (rtems_task_argument ignored) { char c ; struct termios orig_termios, test_termios; - + printf( "\n\n*** TEST OF TERMIOS INPUT CAPABILITIES ***\n" ); if( tcgetattr( fileno( stdin ), &orig_termios ) < 0 ) { @@ -770,7 +770,7 @@ Init (rtems_task_argument ignored) case '\n': break; - + default: printf( "\n%c is not a valid choice. Try again\n\n", c ); usage(); diff --git a/testsuites/mptests/mp01/system.h b/testsuites/mptests/mp01/system.h index 932d4ba404..0eecc51c4f 100644 --- a/testsuites/mptests/mp01/system.h +++ b/testsuites/mptests/mp01/system.h @@ -26,12 +26,12 @@ rtems_task Test_task( ); /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - + #define CONFIGURE_MAXIMUM_TASKS 4 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_GLOBAL diff --git a/testsuites/mptests/mp02/system.h b/testsuites/mptests/mp02/system.h index 48208b6457..7c5ea525ba 100644 --- a/testsuites/mptests/mp02/system.h +++ b/testsuites/mptests/mp02/system.h @@ -26,14 +26,14 @@ rtems_task Test_task( ); /* configuration information */ - + #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 #include diff --git a/testsuites/mptests/mp03/system.h b/testsuites/mptests/mp03/system.h index e332f6d4f0..2305f3d006 100644 --- a/testsuites/mptests/mp03/system.h +++ b/testsuites/mptests/mp03/system.h @@ -29,14 +29,14 @@ rtems_timer_service_routine Delayed_send_event( rtems_id ignored_id, void *ignored_address ); - + /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - + #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_MAXIMUM_TIMERS 1 @@ -51,8 +51,8 @@ TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */ TEST_EXTERN rtems_id Timer_id[ 2 ]; /* array of timer ids */ TEST_EXTERN rtems_name Timer_name[ 2 ]; /* array of timer names */ - + TEST_EXTERN uint32_t remote_node; TEST_EXTERN rtems_id remote_tid; - + /* end of include file */ diff --git a/testsuites/mptests/mp04/system.h b/testsuites/mptests/mp04/system.h index 8aae429d61..18aee8620f 100644 --- a/testsuites/mptests/mp04/system.h +++ b/testsuites/mptests/mp04/system.h @@ -26,12 +26,12 @@ rtems_task Test_task( ); /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - + #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_MAXIMUM_TIMERS 1 diff --git a/testsuites/mptests/mp05/system.h b/testsuites/mptests/mp05/system.h index a0e7ee0d9d..70e8f09e37 100644 --- a/testsuites/mptests/mp05/system.h +++ b/testsuites/mptests/mp05/system.h @@ -28,12 +28,12 @@ rtems_task Test_task( rtems_asr Process_asr( rtems_signal_set ); /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - + #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_MAXIMUM_TIMERS 1 @@ -50,14 +50,14 @@ TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */ TEST_EXTERN rtems_id Timer_id[ 2 ]; /* array of timer ids */ TEST_EXTERN rtems_name Timer_name[ 2 ]; /* array of timer names */ - + TEST_EXTERN volatile rtems_boolean Stop_Test; - + TEST_EXTERN uint32_t remote_node; TEST_EXTERN rtems_id remote_tid; TEST_EXTERN rtems_signal_set remote_signal; TEST_EXTERN rtems_signal_set expected_signal; TEST_EXTERN volatile uint32_t signal_count; TEST_EXTERN volatile uint32_t signal_caught; - + /* end of include file */ diff --git a/testsuites/mptests/mp06/system.h b/testsuites/mptests/mp06/system.h index bec3be7e69..a22f24a70a 100644 --- a/testsuites/mptests/mp06/system.h +++ b/testsuites/mptests/mp06/system.h @@ -26,12 +26,12 @@ rtems_task Test_task( ); /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - + #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_MAXIMUM_TIMERS 1 @@ -46,7 +46,7 @@ TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */ TEST_EXTERN rtems_id Timer_id[ 4 ]; /* array of timer ids */ TEST_EXTERN rtems_name Timer_name[ 4 ]; /* array of timer names */ - + TEST_EXTERN volatile rtems_boolean Stop_Test; /* end of include file */ diff --git a/testsuites/mptests/mp07/system.h b/testsuites/mptests/mp07/system.h index bec3be7e69..a22f24a70a 100644 --- a/testsuites/mptests/mp07/system.h +++ b/testsuites/mptests/mp07/system.h @@ -26,12 +26,12 @@ rtems_task Test_task( ); /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - + #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_MAXIMUM_TIMERS 1 @@ -46,7 +46,7 @@ TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */ TEST_EXTERN rtems_id Timer_id[ 4 ]; /* array of timer ids */ TEST_EXTERN rtems_name Timer_name[ 4 ]; /* array of timer names */ - + TEST_EXTERN volatile rtems_boolean Stop_Test; /* end of include file */ diff --git a/testsuites/mptests/mp08/system.h b/testsuites/mptests/mp08/system.h index c58ed793d2..589fdec459 100644 --- a/testsuites/mptests/mp08/system.h +++ b/testsuites/mptests/mp08/system.h @@ -26,12 +26,12 @@ rtems_task Test_task( ); /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - + #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_MAXIMUM_TIMERS 1 #define CONFIGURE_MAXIMUM_SEMAPHORES 1 diff --git a/testsuites/mptests/mp09/system.h b/testsuites/mptests/mp09/system.h index 13edbb4fa2..c9ba9506d3 100644 --- a/testsuites/mptests/mp09/system.h +++ b/testsuites/mptests/mp09/system.h @@ -30,12 +30,12 @@ void Receive_messages( void ); void Send_messages( void ); /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - + #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_MAXIMUM_TIMERS 1 #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1 @@ -51,7 +51,7 @@ TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */ TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */ TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */ - + extern char buffer1[16]; extern char buffer2[16]; extern char buffer3[16]; diff --git a/testsuites/mptests/mp10/system.h b/testsuites/mptests/mp10/system.h index 185b481878..e2705197da 100644 --- a/testsuites/mptests/mp10/system.h +++ b/testsuites/mptests/mp10/system.h @@ -20,26 +20,26 @@ rtems_task Init( rtems_task_argument argument ); - + rtems_task Test_task1( rtems_task_argument argument ); - + rtems_task Test_task2( rtems_task_argument argument ); - + rtems_task Test_task3( rtems_task_argument restart ); /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - + #if ( NODE_NUMBER == 1 ) #define CONFIGURE_MAXIMUM_TASKS 1 #define CONFIGURE_MAXIMUM_SEMAPHORES 1 diff --git a/testsuites/mptests/mp11/system.h b/testsuites/mptests/mp11/system.h index 895830f1bf..01024fc953 100644 --- a/testsuites/mptests/mp11/system.h +++ b/testsuites/mptests/mp11/system.h @@ -22,15 +22,15 @@ rtems_task Init( ); /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 0 #define CONFIGURE_MP_MAXIMUM_PROXIES 0 - + #define CONFIGURE_MAXIMUM_TASKS 1 #if ( NODE_NUMBER == 1 ) #define CONFIGURE_MAXIMUM_SEMAPHORES 1 @@ -49,7 +49,7 @@ TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */ TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */ TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */ - + TEST_EXTERN rtems_id Semaphore_id[ 2 ]; /* array of semaphore ids */ TEST_EXTERN rtems_name Semaphore_name[ 2 ]; /* array of semaphore names */ diff --git a/testsuites/mptests/mp12/system.h b/testsuites/mptests/mp12/system.h index 3bf3cdb85b..c775956517 100644 --- a/testsuites/mptests/mp12/system.h +++ b/testsuites/mptests/mp12/system.h @@ -24,15 +24,15 @@ rtems_task Init( ); /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 1 #define CONFIGURE_MP_MAXIMUM_PROXIES 0 - + #define CONFIGURE_MAXIMUM_TASKS 1 #if ( NODE_NUMBER == 1 ) #define CONFIGURE_MAXIMUM_PARTITIONS 1 diff --git a/testsuites/mptests/mp13/system.h b/testsuites/mptests/mp13/system.h index e6198c7406..c9b9e9d236 100644 --- a/testsuites/mptests/mp13/system.h +++ b/testsuites/mptests/mp13/system.h @@ -30,9 +30,9 @@ rtems_task Test_task2( ); /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER @@ -53,7 +53,7 @@ TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */ TEST_EXTERN rtems_id Queue_id[ 2 ]; /* array of message queue ids */ TEST_EXTERN rtems_name Queue_name[ 2 ]; /* array of message queue names */ - + TEST_EXTERN rtems_id Semaphore_id[ 2 ]; /* array of semaphore ids */ TEST_EXTERN rtems_name Semaphore_name[ 2 ]; /* array of semaphore names */ diff --git a/testsuites/mptests/mp14/exit.c b/testsuites/mptests/mp14/exit.c index 5e179621c0..69f1cf45f7 100644 --- a/testsuites/mptests/mp14/exit.c +++ b/testsuites/mptests/mp14/exit.c @@ -27,9 +27,9 @@ void Exit_test( void ) * Wait a bit before shutting down so we don't screw up the other node * when our MPCI shuts down */ - + rtems_task_wake_after(20); - + status = rtems_task_mode( RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &old_mode ); directive_failed( status, "rtems_task_mode" ); diff --git a/testsuites/mptests/mp14/system.h b/testsuites/mptests/mp14/system.h index de45a1cfc8..06cfbda7f5 100644 --- a/testsuites/mptests/mp14/system.h +++ b/testsuites/mptests/mp14/system.h @@ -49,12 +49,12 @@ rtems_task Semaphore_task( void Exit_test( void ); /* configuration information */ - + #define CONFIGURE_MP_APPLICATION - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - + #define CONFIGURE_TICKS_PER_TIMESLICE 1 #define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(1) 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" ); } diff --git a/testsuites/support/include/buffer_test_io.h b/testsuites/support/include/buffer_test_io.h index bfeeb0b40a..18902424f0 100644 --- a/testsuites/support/include/buffer_test_io.h +++ b/testsuites/support/include/buffer_test_io.h @@ -1,6 +1,6 @@ /* * Support for running the test output through a buffer - * + * * $Id$ */ @@ -27,7 +27,7 @@ extern "C" { #undef printf #define printf(...) \ do { \ - iprintf( __VA_ARGS__); \ + iprintf( __VA_ARGS__); \ } while (0) #endif @@ -58,7 +58,7 @@ void _test_output_flush(void); #define printf(...) \ do { \ char _buffer[128]; \ - sprintf( _buffer, __VA_ARGS__); \ + sprintf( _buffer, __VA_ARGS__); \ _test_output_append( _buffer ); \ } while (0) @@ -66,7 +66,7 @@ void _test_output_flush(void); #define puts(_string) \ do { \ char _buffer[128]; \ - sprintf( _buffer, "%s\n", _string ); \ + sprintf( _buffer, "%s\n", _string ); \ _test_output_append( _buffer ); \ } while (0) @@ -90,7 +90,7 @@ int _test_output_buffer_index = 0; void _test_output_append(char *_buffer) { char *p; - + for ( p=_buffer ; *p ; p++ ) { _test_output_buffer[_test_output_buffer_index++] = *p; _test_output_buffer[_test_output_buffer_index] = '\0'; @@ -101,7 +101,7 @@ void _test_output_append(char *_buffer) _test_output_buffer[0] = '\0'; } #endif - if ( _test_output_buffer_index >= (_TEST_OUTPUT_BUFFER_SIZE - 80) ) + if ( _test_output_buffer_index >= (_TEST_OUTPUT_BUFFER_SIZE - 80) ) _test_output_flush(); } } diff --git a/testsuites/support/include/tmacros.h b/testsuites/support/include/tmacros.h index cae7b5d9aa..956bee969c 100644 --- a/testsuites/support/include/tmacros.h +++ b/testsuites/support/include/tmacros.h @@ -31,7 +31,7 @@ extern "C" { #define FOREVER 1 /* infinite loop */ #ifdef TEST_INIT -#define TEST_EXTERN +#define TEST_EXTERN #define CONFIGURE_INIT #else #define TEST_EXTERN extern @@ -53,7 +53,7 @@ extern "C" { FLUSH_OUTPUT(); \ rtems_test_exit( 1 ); \ } \ - } while ( 0 ) + } while ( 0 ) /* * These macros properly report errors within the Classic API @@ -83,7 +83,7 @@ extern "C" { do { \ check_dispatch_disable_level( _level ); \ fatal_directive_check_status_only( _stat, _desired, _msg ); \ - } while ( 0 ) + } while ( 0 ) /* * These macros properly report errors from the POSIX API diff --git a/testsuites/tmitrontests/include/timesys.h b/testsuites/tmitrontests/include/timesys.h index 434e74d29e..5b7645ffbe 100644 --- a/testsuites/tmitrontests/include/timesys.h +++ b/testsuites/tmitrontests/include/timesys.h @@ -19,7 +19,7 @@ * How many times a particular operation is performed while timed. */ -#ifndef OPERATION_COUNT +#ifndef OPERATION_COUNT #define OPERATION_COUNT 100 #endif diff --git a/testsuites/tmitrontests/tmitronsem01/init.c b/testsuites/tmitrontests/tmitronsem01/init.c index e840ab9333..b526419ad9 100644 --- a/testsuites/tmitrontests/tmitronsem01/init.c +++ b/testsuites/tmitrontests/tmitronsem01/init.c @@ -56,7 +56,7 @@ void ITRON_Init( void ) * time one invocation of del_sem */ - Timer_initialize(); + Timer_initialize(); (void) del_sem( 1 ); end_time = Read_timer(); put_time( @@ -107,8 +107,8 @@ void ITRON_Init( void ) /* * time sig_sem (no waiting tasks) */ - - Timer_initialize(); + + Timer_initialize(); for ( index = 1 ; index<=OPERATION_COUNT ; index++ ) (void) sig_sem( 1 ); end_time = Read_timer(); diff --git a/testsuites/tmtests/tm01/system.h b/testsuites/tmtests/tm01/system.h index f640c0beaa..9c1adfe6cd 100644 --- a/testsuites/tmtests/tm01/system.h +++ b/testsuites/tmtests/tm01/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_MAXIMUM_SEMAPHORES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm02/system.h b/testsuites/tmtests/tm02/system.h index fccea54f9f..fea950a0d8 100644 --- a/testsuites/tmtests/tm02/system.h +++ b/testsuites/tmtests/tm02/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT) #define CONFIGURE_MAXIMUM_SEMAPHORES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm03/system.h b/testsuites/tmtests/tm03/system.h index 2d3260b4f4..10a628a801 100644 --- a/testsuites/tmtests/tm03/system.h +++ b/testsuites/tmtests/tm03/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT) #define CONFIGURE_MAXIMUM_SEMAPHORES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm04/system.h b/testsuites/tmtests/tm04/system.h index 7dd2a3e979..4525dfc296 100644 --- a/testsuites/tmtests/tm04/system.h +++ b/testsuites/tmtests/tm04/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (4 + OPERATION_COUNT) #define CONFIGURE_MAXIMUM_SEMAPHORES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm05/system.h b/testsuites/tmtests/tm05/system.h index 7783cd172e..737a242371 100644 --- a/testsuites/tmtests/tm05/system.h +++ b/testsuites/tmtests/tm05/system.h @@ -25,13 +25,13 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT) #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm06/system.h b/testsuites/tmtests/tm06/system.h index 7783cd172e..737a242371 100644 --- a/testsuites/tmtests/tm06/system.h +++ b/testsuites/tmtests/tm06/system.h @@ -25,13 +25,13 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT) #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm07/system.h b/testsuites/tmtests/tm07/system.h index 7783cd172e..737a242371 100644 --- a/testsuites/tmtests/tm07/system.h +++ b/testsuites/tmtests/tm07/system.h @@ -25,13 +25,13 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT) #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm08/system.h b/testsuites/tmtests/tm08/system.h index 8ed7ca95a3..78225d5f42 100644 --- a/testsuites/tmtests/tm08/system.h +++ b/testsuites/tmtests/tm08/system.h @@ -25,13 +25,13 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS 3 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm09/system.h b/testsuites/tmtests/tm09/system.h index 4b43aa01aa..6d0465140a 100644 --- a/testsuites/tmtests/tm09/system.h +++ b/testsuites/tmtests/tm09/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE) diff --git a/testsuites/tmtests/tm10/system.h b/testsuites/tmtests/tm10/system.h index dc813ddeb4..30f4a58f66 100644 --- a/testsuites/tmtests/tm10/system.h +++ b/testsuites/tmtests/tm10/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT) #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm10/task1.c b/testsuites/tmtests/tm10/task1.c index cdaf183e99..076154e49e 100644 --- a/testsuites/tmtests/tm10/task1.c +++ b/testsuites/tmtests/tm10/task1.c @@ -118,7 +118,7 @@ rtems_task High_task( ) { uint32_t size; - + Timer_initialize(); (void) rtems_message_queue_receive( Queue_id, @@ -134,7 +134,7 @@ rtems_task Middle_tasks( ) { uint32_t size; - + (void) rtems_message_queue_receive( Queue_id, (long (*)[4]) Buffer, diff --git a/testsuites/tmtests/tm11/system.h b/testsuites/tmtests/tm11/system.h index 23c5d32a40..cbf3c8a6c8 100644 --- a/testsuites/tmtests/tm11/system.h +++ b/testsuites/tmtests/tm11/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT) #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm11/task1.c b/testsuites/tmtests/tm11/task1.c index 28be198553..59a5a877ec 100644 --- a/testsuites/tmtests/tm11/task1.c +++ b/testsuites/tmtests/tm11/task1.c @@ -132,7 +132,7 @@ rtems_task High_task( ) { uint32_t size; - + (void) rtems_message_queue_receive( Queue_id, (long (*)[4]) Buffer, diff --git a/testsuites/tmtests/tm12/system.h b/testsuites/tmtests/tm12/system.h index 23c5d32a40..cbf3c8a6c8 100644 --- a/testsuites/tmtests/tm12/system.h +++ b/testsuites/tmtests/tm12/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT) #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm13/system.h b/testsuites/tmtests/tm13/system.h index 23c5d32a40..cbf3c8a6c8 100644 --- a/testsuites/tmtests/tm13/system.h +++ b/testsuites/tmtests/tm13/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT) #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm14/system.h b/testsuites/tmtests/tm14/system.h index 23c5d32a40..cbf3c8a6c8 100644 --- a/testsuites/tmtests/tm14/system.h +++ b/testsuites/tmtests/tm14/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT) #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm15/system.h b/testsuites/tmtests/tm15/system.h index 7783cd172e..737a242371 100644 --- a/testsuites/tmtests/tm15/system.h +++ b/testsuites/tmtests/tm15/system.h @@ -25,13 +25,13 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT) #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm16/system.h b/testsuites/tmtests/tm16/system.h index 7f9d16dcec..43e856bd09 100644 --- a/testsuites/tmtests/tm16/system.h +++ b/testsuites/tmtests/tm16/system.h @@ -25,13 +25,13 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (3 + OPERATION_COUNT) #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm17/system.h b/testsuites/tmtests/tm17/system.h index 7783cd172e..737a242371 100644 --- a/testsuites/tmtests/tm17/system.h +++ b/testsuites/tmtests/tm17/system.h @@ -25,13 +25,13 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT) #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm18/system.h b/testsuites/tmtests/tm18/system.h index 7783cd172e..737a242371 100644 --- a/testsuites/tmtests/tm18/system.h +++ b/testsuites/tmtests/tm18/system.h @@ -25,13 +25,13 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT) #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm19/system.h b/testsuites/tmtests/tm19/system.h index 3734d33149..0b1c12b69a 100644 --- a/testsuites/tmtests/tm19/system.h +++ b/testsuites/tmtests/tm19/system.h @@ -25,13 +25,13 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS 4 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm20/system.h b/testsuites/tmtests/tm20/system.h index 79a69823b4..c00bae3ffe 100644 --- a/testsuites/tmtests/tm20/system.h +++ b/testsuites/tmtests/tm20/system.h @@ -25,7 +25,7 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER @@ -34,7 +34,7 @@ rtems_task Init( #define CONFIGURE_MAXIMUM_PARTITIONS 1 #define CONFIGURE_MAXIMUM_REGIONS 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm21/system.h b/testsuites/tmtests/tm21/system.h index 2e98ba930a..a08597cac6 100644 --- a/testsuites/tmtests/tm21/system.h +++ b/testsuites/tmtests/tm21/system.h @@ -25,7 +25,7 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER @@ -39,7 +39,7 @@ rtems_task Init( #define CONFIGURE_MAXIMUM_PERIODS OPERATION_COUNT #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm22/system.h b/testsuites/tmtests/tm22/system.h index 91a3c54077..25ff88f316 100644 --- a/testsuites/tmtests/tm22/system.h +++ b/testsuites/tmtests/tm22/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS 4 #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm23/system.h b/testsuites/tmtests/tm23/system.h index 7cfeb88587..7e5b843a83 100644 --- a/testsuites/tmtests/tm23/system.h +++ b/testsuites/tmtests/tm23/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (1 + OPERATION_COUNT) #define CONFIGURE_MAXIMUM_TIMERS OPERATION_COUNT #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm24/system.h b/testsuites/tmtests/tm24/system.h index 7783cd172e..737a242371 100644 --- a/testsuites/tmtests/tm24/system.h +++ b/testsuites/tmtests/tm24/system.h @@ -25,13 +25,13 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT) #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm25/system.h b/testsuites/tmtests/tm25/system.h index fccea54f9f..fea950a0d8 100644 --- a/testsuites/tmtests/tm25/system.h +++ b/testsuites/tmtests/tm25/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT) #define CONFIGURE_MAXIMUM_SEMAPHORES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm26/system.h b/testsuites/tmtests/tm26/system.h index 8271eac19c..d1a7f6a481 100644 --- a/testsuites/tmtests/tm26/system.h +++ b/testsuites/tmtests/tm26/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (6 + OPERATION_COUNT) #define CONFIGURE_MAXIMUM_SEMAPHORES 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c index 293f77ead3..2fc60b1bdc 100644 --- a/testsuites/tmtests/tm26/task1.c +++ b/testsuites/tmtests/tm26/task1.c @@ -197,15 +197,15 @@ rtems_task High_task( Timer_initialize(); rtems_interrupt_disable( level ); isr_disable_time = Read_timer(); - + Timer_initialize(); rtems_interrupt_flash( level ); isr_flash_time = Read_timer(); - + Timer_initialize(); rtems_interrupt_enable( level ); isr_enable_time = Read_timer(); - + Timer_initialize(); _Thread_Disable_dispatch(); thread_disable_dispatch_time = Read_timer(); @@ -445,7 +445,7 @@ void complete_test( void ) 0, 0 ); - + put_time( "_ISR_Enable", isr_enable_time, @@ -453,7 +453,7 @@ void complete_test( void ) 0, 0 ); - + put_time( "_Thread_Disable_dispatch", thread_disable_dispatch_time, diff --git a/testsuites/tmtests/tm27/system.h b/testsuites/tmtests/tm27/system.h index 8ed7ca95a3..78225d5f42 100644 --- a/testsuites/tmtests/tm27/system.h +++ b/testsuites/tmtests/tm27/system.h @@ -25,13 +25,13 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS 3 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm27/task1.c b/testsuites/tmtests/tm27/task1.c index f3a3fdd102..4df365e627 100644 --- a/testsuites/tmtests/tm27/task1.c +++ b/testsuites/tmtests/tm27/task1.c @@ -11,7 +11,7 @@ */ /* - * WARNING!!!!!!!!! + * WARNING!!!!!!!!! * * THIS TEST USES INTERNAL RTEMS VARIABLES!!! */ @@ -189,7 +189,7 @@ rtems_task Task_1( } /* - * NOTE: When this task is executing, some of the assumptions made + * NOTE: When this task is executing, some of the assumptions made * regarding the placement of the currently executing task's TCB * on the ready chains have been violated. At least the assumption * that this task is at the head of the chain for its priority @@ -228,9 +228,9 @@ rtems_task Task_2( */ _Thread_Dispatch_disable_level = 0; - + _Thread_Heir = (rtems_tcb *) _Thread_Ready_chain[254].first; - + _Context_Switch_necessary = 1; _Thread_Dispatch(); diff --git a/testsuites/tmtests/tm28/system.h b/testsuites/tmtests/tm28/system.h index 8c9d689431..e61e7d34da 100644 --- a/testsuites/tmtests/tm28/system.h +++ b/testsuites/tmtests/tm28/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_MAXIMUM_PORTS 1 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tm29/system.h b/testsuites/tmtests/tm29/system.h index 70f0614984..3c47c991b0 100644 --- a/testsuites/tmtests/tm29/system.h +++ b/testsuites/tmtests/tm29/system.h @@ -25,14 +25,14 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS (2 + OPERATION_COUNT) #define CONFIGURE_MAXIMUM_PERIODS OPERATION_COUNT #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2) diff --git a/testsuites/tmtests/tmck/system.h b/testsuites/tmtests/tmck/system.h index 54816df066..94ea151363 100644 --- a/testsuites/tmtests/tmck/system.h +++ b/testsuites/tmtests/tmck/system.h @@ -25,13 +25,13 @@ rtems_task Init( #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/testsuites/tmtests/tmck/task1.c b/testsuites/tmtests/tmck/task1.c index f890201901..658e8d1fe7 100644 --- a/testsuites/tmtests/tmck/task1.c +++ b/testsuites/tmtests/tmck/task1.c @@ -35,7 +35,7 @@ rtems_task Init( rtems_status_code status; /* - * Tell the Timer Driver what we are doing + * Tell the Timer Driver what we are doing */ Set_find_average_overhead( 1 ); @@ -152,12 +152,12 @@ void check_read_timer() end_time = Read_timer(); if ( end_time > MAXIMUM_DISTRIBUTION ) { /* - * Under UNIX a simple process swap takes longer than we + * Under UNIX a simple process swap takes longer than we * consider valid for our testing purposes. */ printf( "TOO LONG (%d) at index %d!!!\n", end_time, index ); #if defined(unix) - index--; + index--; continue; #else rtems_test_exit( 1 ); diff --git a/testsuites/tmtests/tmoverhd/system.h b/testsuites/tmtests/tmoverhd/system.h index 73b2b58ce0..5095438388 100644 --- a/testsuites/tmtests/tmoverhd/system.h +++ b/testsuites/tmtests/tmoverhd/system.h @@ -25,31 +25,31 @@ rtems_task Init( rtems_timer_service_routine Timer_handler( rtems_id argument ); - + rtems_asr Isr_handler( rtems_signal_set signals ); - + rtems_asr Asr_handler( rtems_signal_set signals ); - + rtems_task task_func(); - + void null_func(); - + rtems_status_code Empty_directive(); #include /* configuration information */ - + #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER #define CONFIGURE_MAXIMUM_TASKS 2 #define CONFIGURE_TICKS_PER_TIMESLICE 0 - + #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #include diff --git a/tools/build/binpatch.c b/tools/build/binpatch.c index 9f7e87c835..b9e2ac1a06 100644 --- a/tools/build/binpatch.c +++ b/tools/build/binpatch.c @@ -13,7 +13,7 @@ static char buf[512]; -static void +static void usage(void) { printf("usage: binpatch [-h] " @@ -40,8 +40,8 @@ main(int argc, char **argv) FILE *ofp, *ifp; char patch[4], *end; int patchLen, tmp, i, off, cnt, patched, len, reloc; - - + + /* parse command line options */ while ((c = getopt(argc, argv, "h")) >= 0) { @@ -93,7 +93,7 @@ main(int argc, char **argv) } patch[i] = tmp; } - + ifp = fopen(argv[2], "r"); if(ifp == NULL) { @@ -137,7 +137,7 @@ main(int argc, char **argv) } patched = 1; } - + fwrite(buf, 1, len, ofp); cnt += len; @@ -145,7 +145,7 @@ main(int argc, char **argv) fclose(ifp); fclose(ofp); - + if(!patched) { fprintf(stderr, "warning: offset is beyond input file length\n"); diff --git a/tools/build/packhex.c b/tools/build/packhex.c index 3b85a7c927..1e8edb615e 100644 --- a/tools/build/packhex.c +++ b/tools/build/packhex.c @@ -493,7 +493,7 @@ int main( } length = strlen(inbuff); inbuff[length - 1] = '\0'; - + } diff --git a/tools/build/unhex.c b/tools/build/unhex.c index 484a4d02d1..693049f465 100644 --- a/tools/build/unhex.c +++ b/tools/build/unhex.c @@ -111,7 +111,7 @@ void error(int errn, ...); #else #define stol(p) strtol(p, (char **) NULL, 0) #endif - + int unhex(FILE *ifp, char *inm, FILE *ofp, char *onm); int convert_Intel_records(FILE *ifp, char *inm, FILE *ofp, char *onm); int convert_S_records(FILE *ifp, char *inm, FILE *ofp, char *onm); diff --git a/tools/cpu/sh/sci.c b/tools/cpu/sh/sci.c index 2b0cbd758f..bc7fdd83a8 100644 --- a/tools/cpu/sh/sci.c +++ b/tools/cpu/sh/sci.c @@ -12,11 +12,11 @@ /* n .. baudrate generator source 0,1,2,3 - + N .. BRR setting (0..255) - + Phi .. processor baud rate - + B .. bitrate */ @@ -51,20 +51,20 @@ static unsigned int bitrate [] = { static sci_tab_t test_array[4] ; -static void Compute( - unsigned int n, - unsigned int B, +static void Compute( + unsigned int n, + unsigned int B, double Phi, struct sci_tab *entry ) { int a = ( 32 << ( 2 * n ) ) * B ; - + entry->n = n ; entry->B = B ; entry->N = rint( ( Phi / a ) - 1.0 ) ; - if ( ( entry->N > 0 ) && ( entry->N < 256 ) ) - entry->err = + if ( ( entry->N > 0 ) && ( entry->N < 256 ) ) + entry->err = ( ( Phi / ( (entry->N + 1) * a ) - 1.0 ) * 100.0 ); else { @@ -74,17 +74,17 @@ static void Compute( } } -static sci_tab_t *SelectN( +static sci_tab_t *SelectN( unsigned int B, double Phi ) { unsigned int i ; struct sci_tab* best = NULL ; - + for ( i = 0 ; i < 4 ; i++ ) - { + { double err ; - + Compute( i, B, Phi, &test_array[i] ); err = fabs( test_array[i].err ); @@ -97,7 +97,7 @@ static sci_tab_t *SelectN( best = &test_array[i] ; } - return best ; + return best ; } int shgen_gensci( @@ -106,7 +106,7 @@ int shgen_gensci( { unsigned int i ; - fprintf( file, + fprintf( file, "/*\n * Bitrate table for the serial devices (sci) of the SH at %.3f MHz\n" " */\n\n", Phi / 1000000.0 ); fprintf( file, @@ -118,13 +118,13 @@ int shgen_gensci( " * We experienced values less than 2%% to be stable\n" " */\n\n" ); fprintf( file, "#include \n\n" ); - fprintf( file, + fprintf( file, "static struct sci_bitrate_t {\n" " unsigned char n ;\n" " unsigned char N ;\n" "} _sci_bitrates[] = {\n" "/* n N error */\n" ); - + for ( i = 0 ; i < sizeof(bitrate)/sizeof(int) ; i++ ) { struct sci_tab* best = SelectN( bitrate[i], Phi ); @@ -143,7 +143,7 @@ int shgen_gensci( fprintf( file, "\n};\n\n" ); - fprintf( file, + fprintf( file, "int _sci_get_brparms( \n" " tcflag_t cflag,\n" " unsigned char *smr,\n" @@ -160,6 +160,6 @@ int shgen_gensci( " *brr = _sci_bitrates[offset].N;\n\n" " return 0;\n" "}\n" ); - + return 0 ; } diff --git a/tools/cpu/sh/shgen.c b/tools/cpu/sh/shgen.c index 73c8a4f027..b4ab34b5cd 100644 --- a/tools/cpu/sh/shgen.c +++ b/tools/cpu/sh/shgen.c @@ -44,12 +44,12 @@ static struct option long_options[] = static void shgen_header( FILE *file ) { - fprintf( file, + fprintf( file, "/*\n * DO NOT EDIT - this file is automatically generated by shgen %s\n", VERSION ); fprintf( file, " * Copyright (c) 1998,1999,2000 Ralf Corsepius (corsepiu@faw.uni-ulm.de)\n */\n" ); - fprintf( file, + fprintf( file, "\n/* This file is not copyrighted */\n\n" ); } @@ -57,7 +57,7 @@ int main( int argc, char *argv[] ) { double Phi = 20000000.0 ; -#if HAVE_GETOPT_LONG +#if HAVE_GETOPT_LONG int option_index = 0 ; while( ( optopt = getopt_long( argc, argv, "M:K:H:hv", long_options, &option_index ) ) > 0 ) @@ -68,11 +68,11 @@ int main( int argc, char *argv[] ) switch ( optopt ) { case 'M' : - sscanf( optarg, "%lf", &Phi ); + sscanf( optarg, "%lf", &Phi ); Phi = Phi * 1000000.0; break ; case 'K' : - sscanf( optarg, "%lf", &Phi ); + sscanf( optarg, "%lf", &Phi ); Phi = Phi * 1000.0; break ; case 'H' : @@ -96,9 +96,9 @@ int main( int argc, char *argv[] ) fprintf( stderr, "%s: Missing argument: driver\n", argv[0] ); exit(1); } - + shgen_header( stdout ); - + if ( strcmp( argv[optind], "sci" ) == 0 ) { shgen_gensci( stdout, Phi ); @@ -108,6 +108,6 @@ int main( int argc, char *argv[] ) fprintf( stderr, "%s: Invalid argument: driver\n", argv[0] ); exit(1); } - + return 0 ; } -- cgit v1.2.3