forked from Imagelibrary/rtems
Convert to "bool".
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include <at91rm9200_pmc.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 *
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user