From 3551166d7b747c5efbd1659e453493f4e0e0e93b Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 5 Sep 2008 11:55:58 +0000 Subject: Convert to "bool". --- c/src/lib/libbsp/powerpc/score603e/console/85c30.c | 8 ++++---- c/src/lib/libbsp/powerpc/score603e/console/console.c | 6 +++--- c/src/lib/libbsp/powerpc/score603e/irq/FPGA.c | 10 +++++----- c/src/lib/libbsp/powerpc/score603e/timer/timer.c | 2 +- c/src/lib/libbsp/powerpc/score603e/tod/tod.c | 4 ++-- c/src/lib/libcpu/arm/at91rm9200/timer/timer.c | 6 ++---- c/src/lib/libcpu/arm/lpc22xx/timer/timer.c | 6 ++---- c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c | 6 ++---- c/src/lib/libcpu/arm/s3c2400/timer/timer.c | 6 ++---- c/src/lib/libcpu/arm/s3c24xx/timer/timer.c | 6 ++---- c/src/lib/libcpu/bfin/network/ethernet.c | 16 ++++++++-------- c/src/lib/libcpu/bfin/serial/twi.c | 12 ++++++------ c/src/lib/libcpu/bfin/timer/timer.c | 6 ++---- c/src/lib/libcpu/m68k/mcf5206/timer/timer.c | 6 +++--- c/src/lib/libcpu/m68k/mcf5272/timer/timer.c | 6 +++--- 15 files changed, 47 insertions(+), 59 deletions(-) (limited to 'c/src') diff --git a/c/src/lib/libbsp/powerpc/score603e/console/85c30.c b/c/src/lib/libbsp/powerpc/score603e/console/85c30.c index 823c8bf262..056043aa57 100644 --- a/c/src/lib/libbsp/powerpc/score603e/console/85c30.c +++ b/c/src/lib/libbsp/powerpc/score603e/console/85c30.c @@ -396,7 +396,7 @@ rtems_isr ISR_85c30_Async( uint16_t status; volatile Console_Protocol *Protocol; unsigned char data; - bool did_something = FALSE; + bool did_something = false; Protocol = Port->Protocol; @@ -412,7 +412,7 @@ rtems_isr ISR_85c30_Async( rtems_termios_enqueue_raw_characters( Port->Protocol->console_termios_data, &data, 1 ); - did_something = TRUE; + did_something = true; } /* @@ -425,11 +425,11 @@ rtems_isr ISR_85c30_Async( Write_85c30_register( Port->ctrl, DATA_REGISTER, data ); } else { - Protocol->Is_TX_active = FALSE; + Protocol->Is_TX_active = false; Write_85c30_register( Port->ctrl, STATUS_REGISTER, 0x28 ); } - did_something = TRUE; + did_something = true; } /* diff --git a/c/src/lib/libbsp/powerpc/score603e/console/console.c b/c/src/lib/libbsp/powerpc/score603e/console/console.c index ca609b51b7..a385431876 100644 --- a/c/src/lib/libbsp/powerpc/score603e/console/console.c +++ b/c/src/lib/libbsp/powerpc/score603e/console/console.c @@ -174,7 +174,7 @@ void console_initialize_interrupts( void ) */ buffer = &protocol->TX_Buffer; Ring_buffer_Initialize( buffer ); - protocol->Is_TX_active = FALSE; + protocol->Is_TX_active = false; } /* @@ -418,10 +418,10 @@ void console_outbyte_interrupts( * If this is the first character then we need to prime the pump */ - if ( protocol->Is_TX_active == FALSE ) { + if ( protocol->Is_TX_active == false ) { rtems_interrupt_disable( isrlevel ); - protocol->Is_TX_active = TRUE; + protocol->Is_TX_active = true; outbyte_polled_85c30( Port->ctrl, ch ); rtems_interrupt_enable( isrlevel ); diff --git a/c/src/lib/libbsp/powerpc/score603e/irq/FPGA.c b/c/src/lib/libbsp/powerpc/score603e/irq/FPGA.c index 3303a42ce8..6b24f44e5c 100644 --- a/c/src/lib/libbsp/powerpc/score603e/irq/FPGA.c +++ b/c/src/lib/libbsp/powerpc/score603e/irq/FPGA.c @@ -125,20 +125,20 @@ bool Is_PMC_IRQ( uint16_t status_word ) { - bool result = FALSE; + bool result = false; switch(pmc_irq) { case SCORE603E_85C30_4_IRQ: - result = Is_PMC_85C30_4_IRQ( status_word ); + result = Is_PMC_85C30_4_IRQ( status_word ) ? true : false; break; case SCORE603E_85C30_2_IRQ: - result = Is_PMC_85C30_2_IRQ( status_word ); + result = Is_PMC_85C30_2_IRQ( status_word ) ? true : false; break; case SCORE603E_85C30_5_IRQ: - result = Is_PMC_85C30_5_IRQ( status_word ); + result = Is_PMC_85C30_5_IRQ( status_word ) ? true : false; break; case SCORE603E_85C30_3_IRQ: - result = Is_PMC_85C30_3_IRQ( status_word ); + result = Is_PMC_85C30_3_IRQ( status_word ) ? true : false; break; default: assert( 0 ); diff --git a/c/src/lib/libbsp/powerpc/score603e/timer/timer.c b/c/src/lib/libbsp/powerpc/score603e/timer/timer.c index 09e569aaf3..4e5c06c232 100644 --- a/c/src/lib/libbsp/powerpc/score603e/timer/timer.c +++ b/c/src/lib/libbsp/powerpc/score603e/timer/timer.c @@ -61,7 +61,7 @@ int benchmark_timer_read() total = (uint32_t) total64; - if ( benchmark_timer_find_average_overhead == 1 ) + if ( benchmark_timer_find_average_overhead == true ) return total; /* in "clicks" of the decrementer units */ if ( total < BSP_TIMER_LEAST_VALID ) diff --git a/c/src/lib/libbsp/powerpc/score603e/tod/tod.c b/c/src/lib/libbsp/powerpc/score603e/tod/tod.c index 102400da0d..1d2ab41851 100644 --- a/c/src/lib/libbsp/powerpc/score603e/tod/tod.c +++ b/c/src/lib/libbsp/powerpc/score603e/tod/tod.c @@ -107,12 +107,12 @@ void ICM7170_GetTOD( { int year; int usec; - static bool init = TRUE; + static bool init = true; /* Initialize the clock at once prior to reading */ if (init ) { ICM7170_SetField( imc1770_regs, 0x11, (0x0c | icm1770_freq) ); - init = FALSE; + init = false; } /* Latch times */ diff --git a/c/src/lib/libcpu/arm/at91rm9200/timer/timer.c b/c/src/lib/libcpu/arm/at91rm9200/timer/timer.c index 35cf5cb6a8..7e407d82cf 100644 --- a/c/src/lib/libcpu/arm/at91rm9200/timer/timer.c +++ b/c/src/lib/libcpu/arm/at91rm9200/timer/timer.c @@ -28,7 +28,7 @@ #include uint16_t tstart; -rtems_boolean benchmark_timer_find_average_overhead; +bool benchmark_timer_find_average_overhead; uint32_t tick_time; /* * Set up TC0 - @@ -92,9 +92,7 @@ int benchmark_timer_read( void ) } } -void benchmark_timer_disable_subtracting_average_overhead( - rtems_boolean find_flag -) +void benchmark_timer_disable_subtracting_average_overhead(bool find_flag) { benchmark_timer_find_average_overhead = find_flag; } diff --git a/c/src/lib/libcpu/arm/lpc22xx/timer/timer.c b/c/src/lib/libcpu/arm/lpc22xx/timer/timer.c index ae63fb0d84..91f6df408b 100644 --- a/c/src/lib/libcpu/arm/lpc22xx/timer/timer.c +++ b/c/src/lib/libcpu/arm/lpc22xx/timer/timer.c @@ -29,7 +29,7 @@ uint32_t g_start; uint32_t g_freq; -rtems_boolean benchmark_timer_find_average_overhead; +bool benchmark_timer_find_average_overhead; /* @@ -65,9 +65,7 @@ int benchmark_timer_read( void ) */ } -void benchmark_timer_disable_subtracting_average_overhead( - rtems_boolean find_flag -) +void benchmark_timer_disable_subtracting_average_overhead(bool find_flag) { benchmark_timer_find_average_overhead = find_flag; } diff --git a/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c b/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c index 6403e43a6e..f97ba13751 100644 --- a/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c +++ b/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c @@ -30,7 +30,7 @@ uint32_t g_start; uint32_t g_freq; -rtems_boolean benchmark_timer_find_average_overhead; +bool benchmark_timer_find_average_overhead; /* @@ -94,9 +94,7 @@ int benchmark_timer_read( void ) return (total - AVG_OVERHEAD); } -void benchmark_timer_disable_subtracting_average_overhead( - rtems_boolean find_flag -) +void benchmark_timer_disable_subtracting_average_overhead(bool find_flag) { benchmark_timer_find_average_overhead = find_flag; } diff --git a/c/src/lib/libcpu/arm/s3c2400/timer/timer.c b/c/src/lib/libcpu/arm/s3c2400/timer/timer.c index 99b908f9ff..aa9dd22077 100644 --- a/c/src/lib/libcpu/arm/s3c2400/timer/timer.c +++ b/c/src/lib/libcpu/arm/s3c2400/timer/timer.c @@ -27,7 +27,7 @@ uint32_t g_start; uint32_t g_freq; -rtems_boolean benchmark_timer_find_average_overhead; +bool benchmark_timer_find_average_overhead; /* @@ -101,9 +101,7 @@ int benchmark_timer_read( void ) return (total - AVG_OVERHEAD); } -void benchmark_timer_disable_subtracting_average_overhead( - rtems_boolean find_flag -) +void benchmark_timer_disable_subtracting_average_overhead(bool find_flag) { benchmark_timer_find_average_overhead = find_flag; } diff --git a/c/src/lib/libcpu/arm/s3c24xx/timer/timer.c b/c/src/lib/libcpu/arm/s3c24xx/timer/timer.c index 8839d98d6c..7c9fda8512 100644 --- a/c/src/lib/libcpu/arm/s3c24xx/timer/timer.c +++ b/c/src/lib/libcpu/arm/s3c24xx/timer/timer.c @@ -27,7 +27,7 @@ uint32_t g_start; uint32_t g_freq; -rtems_boolean benchmark_timer_find_average_overhead; +bool benchmark_timer_find_average_overhead; /* @@ -101,9 +101,7 @@ int benchmark_timer_read( void ) return (total - AVG_OVERHEAD); } -void benchmark_timer_disable_subtracting_average_overhead( - rtems_boolean find_flag -) +void benchmark_timer_disable_subtracting_average_overhead(bool find_flag) { benchmark_timer_find_average_overhead = find_flag; } diff --git a/c/src/lib/libcpu/bfin/network/ethernet.c b/c/src/lib/libcpu/bfin/network/ethernet.c index 3b9c8fb32f..3387f9aa34 100644 --- a/c/src/lib/libcpu/bfin/network/ethernet.c +++ b/c/src/lib/libcpu/bfin/network/ethernet.c @@ -140,7 +140,7 @@ typedef struct { typedef struct { dmaDescT data; dmaDescT status; - boolean inUse; + bool inUse; union { uint32_t dummy; /* try to force 32 bit alignment */ struct { @@ -285,19 +285,19 @@ void bfin_ethernet_mac_isr(int vector) { } } -static boolean txFree(struct bfin_ethernetSoftc *sc, int index) { - boolean freed; +static bool txFree(struct bfin_ethernetSoftc *sc, int index) { + bool freed; txStatusT *status; - freed = FALSE; + freed = false; if (sc->tx[index].inUse) { status = (txStatusT *) sc->tx[index].status.addr; rtems_cache_invalidate_multiple_data_lines(status, sizeof(*status)); if (status->status != 0) { /* update statistics */ - sc->tx[index].inUse = FALSE; - freed = TRUE; + sc->tx[index].inUse = false; + freed = true; } } @@ -363,7 +363,7 @@ static void txDaemon(void *arg) { /* setup tx dma */ status = (txStatusT *) sc->tx[head].status.addr; status->status = 0; - sc->tx[head].inUse = TRUE; + sc->tx[head].inUse = true; rtems_cache_flush_multiple_data_lines(status, sizeof(*status)); /* configure dma to stop after sending this packet */ @@ -691,7 +691,7 @@ static void initializeHardware(struct bfin_ethernetSoftc *sc) { sc->tx[i].status.next = &(sc->tx[i + 1].data); else sc->tx[i].status.next = &(sc->tx[0].data); - sc->tx[i].inUse = FALSE; + sc->tx[i].inUse = false; ptr += txStatusSize; } rtems_cache_flush_multiple_data_lines(sc->tx, sc->txDescCount * diff --git a/c/src/lib/libcpu/bfin/serial/twi.c b/c/src/lib/libcpu/bfin/serial/twi.c index 97bddaff6a..80abc52bf1 100644 --- a/c/src/lib/libcpu/bfin/serial/twi.c +++ b/c/src/lib/libcpu/bfin/serial/twi.c @@ -37,9 +37,9 @@ static struct { bfin_twi_request_t volatile *req; uint8_t volatile *dataPtr; int volatile count; - boolean volatile masterActive; + bool volatile masterActive; rtems_status_code volatile masterResult; - boolean volatile slaveActive; + bool volatile slaveActive; } twi[N_BFIN_TWI]; @@ -144,7 +144,7 @@ void bfin_twi_isr(int source) { if (stat) { BFIN_REG16(base, TWI_INT_STAT_OFFSET) = stat; if ((stat & TWI_INT_STAT_SINIT) && !twi[i].slaveActive) { - twi[i].slaveActive = TRUE; + twi[i].slaveActive = true; r = BFIN_REG16(base, TWI_FIFO_CTL_OFFSET); BFIN_REG16(base, TWI_FIFO_CTL_OFFSET) = r | TWI_FIFO_CTL_XMTFLUSH; BFIN_REG16(base, TWI_FIFO_CTL_OFFSET) = r; @@ -159,7 +159,7 @@ void bfin_twi_isr(int source) { r = BFIN_REG16(base, TWI_SLAVE_CTL_OFFSET); BFIN_REG16(base, TWI_SLAVE_CTL_OFFSET) = r & ~TWI_SLAVE_CTL_STDVAL; - twi[i].slaveActive = FALSE; + twi[i].slaveActive = false; } @@ -230,10 +230,10 @@ rtems_status_code bfin_twi_request(int channel, uint8_t address, twi[channel].count--; } } - twi[channel].masterActive = TRUE; + twi[channel].masterActive = true; BFIN_REG16(base, TWI_MASTER_CTL_OFFSET) = masterMode; } else { - twi[channel].masterActive = FALSE; + twi[channel].masterActive = false; twi[channel].masterResult = -1; /* BISON (code should be equiv to lost arbitration) */ } rtems_interrupt_enable(level); diff --git a/c/src/lib/libcpu/bfin/timer/timer.c b/c/src/lib/libcpu/bfin/timer/timer.c index 8c288f37b0..f60ff57981 100644 --- a/c/src/lib/libcpu/bfin/timer/timer.c +++ b/c/src/lib/libcpu/bfin/timer/timer.c @@ -22,7 +22,7 @@ uint32_t Timer_interrupts; -rtems_boolean benchmark_timer_find_average_overhead; +bool benchmark_timer_find_average_overhead; /* * benchmark_timer_initialize @@ -88,9 +88,7 @@ int benchmark_timer_read( void ) } } -void benchmark_timer_disable_subtracting_average_overhead( - rtems_boolean find_flag -) +void benchmark_timer_disable_subtracting_average_overhead(bool find_flag) { benchmark_timer_find_average_overhead = find_flag; } diff --git a/c/src/lib/libcpu/m68k/mcf5206/timer/timer.c b/c/src/lib/libcpu/m68k/mcf5206/timer/timer.c index b0bd0272bf..3d30b98dcc 100644 --- a/c/src/lib/libcpu/m68k/mcf5206/timer/timer.c +++ b/c/src/lib/libcpu/m68k/mcf5206/timer/timer.c @@ -30,7 +30,7 @@ uint32_t Timer_interrupts; -rtems_boolean benchmark_timer_find_average_overhead; +bool benchmark_timer_find_average_overhead; /* External assembler interrupt handler routine */ extern rtems_isr timerisr(rtems_vector_number vector); @@ -145,13 +145,13 @@ benchmark_timer_read( void ) * timer. * * PARAMETERS: - * find_flag - boolean flag, TRUE if overhead must not be subtracted. + * find_flag - boolean flag, true if overhead must not be subtracted. * * RETURNS: * none */ void -benchmark_timer_disable_subtracting_average_overhead(rtems_boolean find_flag) +benchmark_timer_disable_subtracting_average_overhead(bool find_flag) { benchmark_timer_find_average_overhead = find_flag; } diff --git a/c/src/lib/libcpu/m68k/mcf5272/timer/timer.c b/c/src/lib/libcpu/m68k/mcf5272/timer/timer.c index ca4e006eac..6eaadfcc23 100644 --- a/c/src/lib/libcpu/m68k/mcf5272/timer/timer.c +++ b/c/src/lib/libcpu/m68k/mcf5272/timer/timer.c @@ -30,7 +30,7 @@ uint32_t Timer_interrupts; -rtems_boolean benchmark_timer_find_average_overhead; +bool benchmark_timer_find_average_overhead; /* External assembler interrupt handler routine */ extern rtems_isr timerisr(rtems_vector_number vector); @@ -147,13 +147,13 @@ benchmark_timer_read( void ) * timer. * * PARAMETERS: - * find_flag - boolean flag, TRUE if overhead must not be subtracted. + * find_flag - bool flag, true if overhead must not be subtracted. * * RETURNS: * none */ void -benchmark_timer_disable_subtracting_average_overhead(rtems_boolean find_flag) +benchmark_timer_disable_subtracting_average_overhead(bool find_flag) { benchmark_timer_find_average_overhead = find_flag; } -- cgit v1.2.3