From f0157b8fd85d5ce211b0aae48b53d9d88b59cd68 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Sat, 6 Sep 2008 03:39:58 +0000 Subject: Convert to "bool". --- testsuites/libtests/malloctest/init.c | 6 +++--- testsuites/psxtests/psxcleanup/psxcleanup.c | 6 +++--- testsuites/psxtests/psxfatal_support/init.c | 2 +- testsuites/psxtests/psxfatal_support/system.h | 2 +- testsuites/samples/capture/system.h | 2 +- testsuites/samples/capture/test1.c | 2 +- testsuites/samples/fileio/init.c | 28 +++++++++++++-------------- testsuites/samples/unlimited/init.c | 2 +- testsuites/samples/unlimited/system.h | 2 +- testsuites/samples/unlimited/test1.c | 6 +++--- testsuites/sptests/sp35/priinv.c | 2 +- testsuites/sptests/sp37/init.c | 10 +++++----- testsuites/sptests/sp38/init.c | 4 ++-- testsuites/sptests/sp39/init.c | 2 +- testsuites/sptests/sp41/init.c | 2 +- testsuites/sptests/sp42/init.c | 2 +- testsuites/sptests/sp43/init.c | 2 +- testsuites/sptests/spfatal/fatal.c | 2 +- testsuites/sptests/spfatal/system.h | 2 +- testsuites/sptests/spfatal_support/init.c | 2 +- testsuites/sptests/spfatal_support/system.h | 2 +- testsuites/support/src/test_support.c | 2 +- 22 files changed, 46 insertions(+), 46 deletions(-) (limited to 'testsuites') diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c index e6400f4dec..b1028640b4 100644 --- a/testsuites/libtests/malloctest/init.c +++ b/testsuites/libtests/malloctest/init.c @@ -155,7 +155,7 @@ void test_heap_extend() { void *p1, *p2, *p3, *p4; uint32_t u1, u2; - boolean ret; + bool ret; /* * Easier to hit extend with a dedicated heap. @@ -165,11 +165,11 @@ void test_heap_extend() puts( "heap extend - bad address" ); ret = _Protected_heap_Extend( &TestHeap, TestHeapMemory - 512, 512 ); - rtems_test_assert( ret == FALSE ); + rtems_test_assert( ret == false ); puts( "heap extend - OK" ); ret = _Protected_heap_Extend( &TestHeap, &TestHeapMemory[ 512 ], 512 ); - rtems_test_assert( ret == TRUE ); + rtems_test_assert( ret == true ); } void test_heap_info(void) diff --git a/testsuites/psxtests/psxcleanup/psxcleanup.c b/testsuites/psxtests/psxcleanup/psxcleanup.c index f8092648ab..88e0069c3e 100644 --- a/testsuites/psxtests/psxcleanup/psxcleanup.c +++ b/testsuites/psxtests/psxcleanup/psxcleanup.c @@ -34,9 +34,9 @@ typedef struct { int waiting_writers; /* Count of waiting writers. */ } lock_t; -volatile boolean reader_cleanup_ran; -volatile boolean release_read_lock_ran; -volatile boolean writer_cleanup_ran; +volatile bool reader_cleanup_ran; +volatile bool release_read_lock_ran; +volatile bool writer_cleanup_ran; void waiting_reader_cleanup(void *arg) { diff --git a/testsuites/psxtests/psxfatal_support/init.c b/testsuites/psxtests/psxfatal_support/init.c index 0ad753a1dc..b0e817c2bb 100644 --- a/testsuites/psxtests/psxfatal_support/init.c +++ b/testsuites/psxtests/psxfatal_support/init.c @@ -121,7 +121,7 @@ void Put_Source( uint32_t source ) rtems_extension Fatal_extension( uint32_t source, - boolean is_internal, + bool is_internal, uint32_t error ) { diff --git a/testsuites/psxtests/psxfatal_support/system.h b/testsuites/psxtests/psxfatal_support/system.h index 551632a79f..d5b6366e0a 100644 --- a/testsuites/psxtests/psxfatal_support/system.h +++ b/testsuites/psxtests/psxfatal_support/system.h @@ -28,7 +28,7 @@ void *POSIX_Init( rtems_extension Fatal_extension( uint32_t source, - boolean is_internal, + bool is_internal, uint32_t error ); diff --git a/testsuites/samples/capture/system.h b/testsuites/samples/capture/system.h index b8f1e39c45..d3e81849b1 100644 --- a/testsuites/samples/capture/system.h +++ b/testsuites/samples/capture/system.h @@ -30,7 +30,7 @@ destory_all_tasks( const char *who ); -boolean status_code_bad( +bool status_code_bad( rtems_status_code status_code ); diff --git a/testsuites/samples/capture/test1.c b/testsuites/samples/capture/test1.c index 9242aa7e2f..14b5cf23ee 100644 --- a/testsuites/samples/capture/test1.c +++ b/testsuites/samples/capture/test1.c @@ -111,7 +111,7 @@ static void capture_test_1 (int argc, char** argv, rtems_monitor_command_arg_t* command_arg, - boolean verbose) + bool verbose) { rtems_status_code sc; rtems_name name; diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c index 2b2734dd6e..0b0d3c041c 100644 --- a/testsuites/samples/fileio/init.c +++ b/testsuites/samples/fileio/init.c @@ -278,14 +278,14 @@ void fileio_list_file(void) /* * convert a size string (like 34K or 12M) to actual byte count */ -boolean fileio_str2size(const char *str,uint32_t *res_ptr) +bool fileio_str2size(const char *str,uint32_t *res_ptr) { - boolean failed = FALSE; + bool failed = false; unsigned long size; char suffix = ' '; if (1 > sscanf(str,"%lu%c",&size,&suffix)) { - failed = TRUE; + failed = true; } else if (toupper(suffix) == 'K') { size *= 1024; @@ -294,7 +294,7 @@ boolean fileio_str2size(const char *str,uint32_t *res_ptr) size *= 1024UL*1024UL; } else if (isalpha(suffix)) { - failed = TRUE; + failed = true; } if (!failed) { @@ -314,7 +314,7 @@ void fileio_write_file(void) ssize_t n; rtems_interval start_tick,curr_tick,ticks_per_sec; char *bufptr = NULL; - boolean failed = FALSE; + bool failed = false; static const char write_test_string[] = "The quick brown fox jumps over the lazy dog\n"; static const char write_block_string[] = @@ -341,7 +341,7 @@ void fileio_write_file(void) } if (0 == strlen(fname)) { printf("*** no filename entered, aborted\n"); - failed = TRUE; + failed = true; } } /* @@ -380,7 +380,7 @@ void fileio_write_file(void) bufptr = malloc(buf_size+1); /* extra space for terminating NUL char */ if (bufptr == NULL) { printf("*** malloc failed, aborted\n"); - failed = TRUE; + failed = true; } } /* @@ -416,7 +416,7 @@ void fileio_write_file(void) fd = open(fname,O_WRONLY | O_CREAT | O_TRUNC,S_IREAD|S_IWRITE); if (fd < 0) { printf("*** file create failed, errno = %d(%s)\n",errno,strerror(errno)); - failed = TRUE; + failed = true; } } /* @@ -440,7 +440,7 @@ void fileio_write_file(void) } while ((file_size > curr_pos) && (n > 0)); rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &curr_tick); if (n < 0) { - failed = TRUE; + failed = true; printf("*** file write failed, " "%lu bytes written, " "errno = %d(%s)\n", @@ -477,7 +477,7 @@ void fileio_read_file(void) ssize_t n; rtems_interval start_tick,curr_tick,ticks_per_sec; char *bufptr = NULL; - boolean failed = FALSE; + bool failed = false; printf(" =========================\n"); printf(" READ FILE ... \n"); @@ -500,7 +500,7 @@ void fileio_read_file(void) } if (0 == strlen(fname)) { printf("*** no filename entered, aborted\n"); - failed = TRUE; + failed = true; } } /* @@ -526,7 +526,7 @@ void fileio_read_file(void) bufptr = malloc(buf_size+1); /* extra space for terminating NUL char */ if (bufptr == NULL) { printf("*** malloc failed, aborted\n"); - failed = TRUE; + failed = true; } } /* @@ -537,7 +537,7 @@ void fileio_read_file(void) fd = open(fname,O_RDONLY); if (fd < 0) { printf("*** file open failed, errno = %d(%s)\n",errno,strerror(errno)); - failed = TRUE; + failed = true; } } /* @@ -557,7 +557,7 @@ void fileio_read_file(void) } while (n > 0); rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &curr_tick); if (n < 0) { - failed = TRUE; + failed = true; printf("*** file read failed, " "%lu bytes read, " "errno = %d(%s)\n", diff --git a/testsuites/samples/unlimited/init.c b/testsuites/samples/unlimited/init.c index 9b5f8258d4..8d7445977c 100644 --- a/testsuites/samples/unlimited/init.c +++ b/testsuites/samples/unlimited/init.c @@ -96,7 +96,7 @@ void destory_all_tasks( } } -boolean status_code_bad( +bool status_code_bad( rtems_status_code status_code ) { diff --git a/testsuites/samples/unlimited/system.h b/testsuites/samples/unlimited/system.h index 6412300010..75bde9081c 100644 --- a/testsuites/samples/unlimited/system.h +++ b/testsuites/samples/unlimited/system.h @@ -30,7 +30,7 @@ destory_all_tasks( const char *who ); -boolean status_code_bad( +bool status_code_bad( rtems_status_code status_code ); diff --git a/testsuites/samples/unlimited/test1.c b/testsuites/samples/unlimited/test1.c index c676faf7bb..f11834e49c 100644 --- a/testsuites/samples/unlimited/test1.c +++ b/testsuites/samples/unlimited/test1.c @@ -24,9 +24,9 @@ void test1() { - boolean auto_extend; + bool auto_extend; rtems_status_code result; - uint32_t task_count = 0; + uint32_t task_count = 0; Objects_Information *the_information; char c1 = 'a'; @@ -44,7 +44,7 @@ void test1() the_information = _Objects_Information_table[OBJECTS_CLASSIC_API][OBJECTS_RTEMS_TASKS]; auto_extend = the_information->auto_extend; - the_information->auto_extend = FALSE; + the_information->auto_extend = false; while (task_count < MAX_TASKS) { diff --git a/testsuites/sptests/sp35/priinv.c b/testsuites/sptests/sp35/priinv.c index 0f1ef6fc3d..ec677c33e0 100644 --- a/testsuites/sptests/sp35/priinv.c +++ b/testsuites/sptests/sp35/priinv.c @@ -112,7 +112,7 @@ rtems_id RemoteHwAccess_R; /* Execlusive access to the remote HW */ /* The following variable triggers simulated HW activity */ -volatile boolean StartHw = FALSE; +volatile bool StartHw = false; rtems_task Medium_Exec(rtems_task_argument TaskArg) { diff --git a/testsuites/sptests/sp37/init.c b/testsuites/sptests/sp37/init.c index 3817afcdc0..6480410272 100644 --- a/testsuites/sptests/sp37/init.c +++ b/testsuites/sptests/sp37/init.c @@ -19,7 +19,7 @@ void test_interrupt_inline(void) { rtems_interrupt_level level; - boolean in_isr; + bool in_isr; puts( "interrupt is in progress (use body)" ); in_isr = rtems_interrupt_is_in_progress(); @@ -43,7 +43,7 @@ volatile int isr_in_progress_inline; void check_isr_in_progress_inline(void) { - boolean in_isr; + bool in_isr; in_isr = rtems_interrupt_is_in_progress(); isr_in_progress_inline = ( in_isr ) ? 1 : 2; @@ -59,7 +59,7 @@ rtems_timer_service_routine test_isr_in_progress( void *arg ) { - boolean in_isr; + bool in_isr; check_isr_in_progress_inline(); @@ -116,7 +116,7 @@ rtems_timer_service_routine test_unblock_task( void *arg ) { - boolean in_isr; + bool in_isr; rtems_status_code status; in_isr = rtems_interrupt_is_in_progress(); @@ -147,7 +147,7 @@ rtems_task Init( rtems_time_of_day time; rtems_status_code status; rtems_interrupt_level level; - boolean in_isr; + bool in_isr; rtems_id timer; int i; diff --git a/testsuites/sptests/sp38/init.c b/testsuites/sptests/sp38/init.c index 28689234f8..d31b9fd119 100644 --- a/testsuites/sptests/sp38/init.c +++ b/testsuites/sptests/sp38/init.c @@ -14,8 +14,8 @@ #define CONFIGURE_INIT #include "system.h" -volatile boolean signal_sent; -volatile boolean signal_processed; +volatile bool signal_sent; +volatile bool signal_processed; rtems_id main_task; diff --git a/testsuites/sptests/sp39/init.c b/testsuites/sptests/sp39/init.c index a6ae27680b..16efd7fe01 100644 --- a/testsuites/sptests/sp39/init.c +++ b/testsuites/sptests/sp39/init.c @@ -14,7 +14,7 @@ #define CONFIGURE_INIT #include "system.h" -volatile boolean case_hit; +volatile bool case_hit; rtems_id main_task; rtems_id other_task; diff --git a/testsuites/sptests/sp41/init.c b/testsuites/sptests/sp41/init.c index d0440bf879..b259be614f 100644 --- a/testsuites/sptests/sp41/init.c +++ b/testsuites/sptests/sp41/init.c @@ -15,7 +15,7 @@ #define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ 1 #include "system.h" -volatile boolean case_hit; +volatile bool case_hit; rtems_id main_task; rtems_id Semaphore; diff --git a/testsuites/sptests/sp42/init.c b/testsuites/sptests/sp42/init.c index ce93c244be..66934a594d 100644 --- a/testsuites/sptests/sp42/init.c +++ b/testsuites/sptests/sp42/init.c @@ -63,7 +63,7 @@ rtems_task Locker_task( void do_test( rtems_attribute attr, - boolean extract /* TRUE if extract, not release */ + bool extract /* TRUE if extract, not release */ ) { rtems_status_code status; diff --git a/testsuites/sptests/sp43/init.c b/testsuites/sptests/sp43/init.c index d5fba8ad95..d3e796cbfe 100644 --- a/testsuites/sptests/sp43/init.c +++ b/testsuites/sptests/sp43/init.c @@ -50,7 +50,7 @@ void print_class_info( void change_name( rtems_id id, const char *newName, - boolean printable + bool printable ) { rtems_status_code status; diff --git a/testsuites/sptests/spfatal/fatal.c b/testsuites/sptests/spfatal/fatal.c index 2a57cb89d5..a87e7797d6 100644 --- a/testsuites/sptests/spfatal/fatal.c +++ b/testsuites/sptests/spfatal/fatal.c @@ -57,7 +57,7 @@ void Process_case(); rtems_extension Fatal_extension( uint32_t source, - boolean is_internal, + bool is_internal, uint32_t error ) { diff --git a/testsuites/sptests/spfatal/system.h b/testsuites/sptests/spfatal/system.h index bc04112a72..8d1881c06c 100644 --- a/testsuites/sptests/spfatal/system.h +++ b/testsuites/sptests/spfatal/system.h @@ -28,7 +28,7 @@ void put_error( rtems_extension Fatal_extension( uint32_t source, - boolean is_internal, + bool is_internal, uint32_t error ); diff --git a/testsuites/sptests/spfatal_support/init.c b/testsuites/sptests/spfatal_support/init.c index f68d4e44ec..84bade2691 100644 --- a/testsuites/sptests/spfatal_support/init.c +++ b/testsuites/sptests/spfatal_support/init.c @@ -119,7 +119,7 @@ void Put_Source( uint32_t source ) rtems_extension Fatal_extension( uint32_t source, - boolean is_internal, + bool is_internal, uint32_t error ) { diff --git a/testsuites/sptests/spfatal_support/system.h b/testsuites/sptests/spfatal_support/system.h index 7732e5c6c9..e55d50d69d 100644 --- a/testsuites/sptests/spfatal_support/system.h +++ b/testsuites/sptests/spfatal_support/system.h @@ -28,7 +28,7 @@ rtems_task Init( rtems_extension Fatal_extension( uint32_t source, - boolean is_internal, + bool is_internal, uint32_t error ); diff --git a/testsuites/support/src/test_support.c b/testsuites/support/src/test_support.c index 6f5cbaec24..23a4a2cb5e 100644 --- a/testsuites/support/src/test_support.c +++ b/testsuites/support/src/test_support.c @@ -44,7 +44,7 @@ const char *Get_Longest_Name() void Allocate_majority_of_workspace( int smallest ) { - boolean result; + bool result; Heap_Information_block info; void *temp; -- cgit v1.2.3