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/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 +++--- 10 files changed, 32 insertions(+), 44 deletions(-) (limited to 'c/src/lib/libcpu') 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