forked from Imagelibrary/rtems
Convert to "bool".
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
|
|
||||||
rtems_boolean benchmark_timer_find_average_overhead;
|
bool benchmark_timer_find_average_overhead;
|
||||||
|
|
||||||
static unsigned int volatile lastInitValue;
|
static unsigned int volatile lastInitValue;
|
||||||
|
|
||||||
@@ -47,9 +47,7 @@ int benchmark_timer_read( void )
|
|||||||
return value - lastInitValue;
|
return value - lastInitValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void benchmark_timer_disable_subtracting_average_overhead(
|
void benchmark_timer_disable_subtracting_average_overhead(bool find_flag)
|
||||||
rtems_boolean find_flag
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
benchmark_timer_find_average_overhead = find_flag;
|
benchmark_timer_find_average_overhead = find_flag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
#include <mpc5xx.h>
|
#include <mpc5xx.h>
|
||||||
|
|
||||||
static volatile uint32_t Timer_starting;
|
static volatile uint32_t Timer_starting;
|
||||||
static rtems_boolean benchmark_timer_find_average_overhead;
|
static bool benchmark_timer_find_average_overhead;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is so small that this code will be reproduced where needed.
|
* This is so small that this code will be reproduced where needed.
|
||||||
@@ -101,7 +101,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;
|
benchmark_timer_find_average_overhead = find_flag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
uint64_t Timer_driver_Start_time;
|
uint64_t Timer_driver_Start_time;
|
||||||
|
|
||||||
rtems_boolean benchmark_timer_find_average_overhead = 0;
|
bool benchmark_timer_find_average_overhead = false;
|
||||||
unsigned clicks_overhead = 0;
|
unsigned clicks_overhead = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -71,7 +71,7 @@ int benchmark_timer_read(void)
|
|||||||
|
|
||||||
total = (uint32_t) total64;
|
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 */
|
return total; /* in "clicks" of the decrementer units */
|
||||||
|
|
||||||
return (int) BSP_Convert_decrementer(total - clicks_overhead);
|
return (int) BSP_Convert_decrementer(total - clicks_overhead);
|
||||||
@@ -85,9 +85,7 @@ unsigned long long Read_long_timer(void)
|
|||||||
return BSP_Convert_decrementer(total64 - clicks_overhead);
|
return BSP_Convert_decrementer(total64 - clicks_overhead);
|
||||||
}
|
}
|
||||||
|
|
||||||
void benchmark_timer_disable_subtracting_average_overhead(
|
void benchmark_timer_disable_subtracting_average_overhead(bool find_flag)
|
||||||
rtems_boolean find_flag
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
benchmark_timer_find_average_overhead = find_flag;
|
benchmark_timer_find_average_overhead = find_flag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
#include <mpc8260.h>
|
#include <mpc8260.h>
|
||||||
|
|
||||||
static volatile uint32_t Timer_starting;
|
static volatile uint32_t Timer_starting;
|
||||||
static rtems_boolean benchmark_timer_find_average_overhead;
|
static bool benchmark_timer_find_average_overhead;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is so small that this code will be reproduced where needed.
|
* This is so small that this code will be reproduced where needed.
|
||||||
@@ -100,7 +100,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;
|
benchmark_timer_find_average_overhead = find_flag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
#include <mpc8xx.h>
|
#include <mpc8xx.h>
|
||||||
|
|
||||||
static volatile uint32_t Timer_starting;
|
static volatile uint32_t Timer_starting;
|
||||||
static rtems_boolean benchmark_timer_find_average_overhead;
|
static bool benchmark_timer_find_average_overhead;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is so small that this code will be reproduced where needed.
|
* This is so small that this code will be reproduced where needed.
|
||||||
@@ -91,7 +91,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;
|
benchmark_timer_find_average_overhead = find_flag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ extern uint32_t bsp_timer_least_valid;
|
|||||||
extern uint32_t bsp_timer_average_overhead;
|
extern uint32_t bsp_timer_average_overhead;
|
||||||
|
|
||||||
static volatile uint32_t startedAt;
|
static volatile uint32_t startedAt;
|
||||||
static rtems_boolean subtractOverhead;
|
static bool subtractOverhead;
|
||||||
|
|
||||||
void benchmark_timer_initialize(void)
|
void benchmark_timer_initialize(void)
|
||||||
{
|
{
|
||||||
@@ -67,7 +67,7 @@ int benchmark_timer_read(void)
|
|||||||
return (total - bsp_timer_average_overhead);
|
return (total - bsp_timer_average_overhead);
|
||||||
}
|
}
|
||||||
|
|
||||||
void benchmark_timer_disable_subtracting_average_overhead( rtems_boolean find_flag)
|
void benchmark_timer_disable_subtracting_average_overhead(bool find_flag)
|
||||||
{
|
{
|
||||||
subtractOverhead = find_flag;
|
subtractOverhead = find_flag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ extern rtems_isr timerisr(void);
|
|||||||
|
|
||||||
static uint32_t Timer_interrupts;
|
static uint32_t Timer_interrupts;
|
||||||
|
|
||||||
rtems_boolean benchmark_timer_find_average_overhead;
|
bool benchmark_timer_find_average_overhead;
|
||||||
|
|
||||||
static uint32_t Timer_HZ ;
|
static uint32_t Timer_HZ ;
|
||||||
|
|
||||||
@@ -181,9 +181,7 @@ int benchmark_timer_read( void )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void benchmark_timer_disable_subtracting_average_overhead(
|
void benchmark_timer_disable_subtracting_average_overhead(bool find_flag)
|
||||||
rtems_boolean find_flag
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
benchmark_timer_find_average_overhead = find_flag;
|
benchmark_timer_find_average_overhead = find_flag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ extern rtems_isr timerisr(void);
|
|||||||
|
|
||||||
static uint32_t Timer_interrupts;
|
static uint32_t Timer_interrupts;
|
||||||
|
|
||||||
rtems_boolean benchmark_timer_find_average_overhead;
|
bool benchmark_timer_find_average_overhead;
|
||||||
|
|
||||||
static uint32_t Timer_MHZ ;
|
static uint32_t Timer_MHZ ;
|
||||||
|
|
||||||
@@ -177,9 +177,7 @@ int benchmark_timer_read( void )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void benchmark_timer_disable_subtracting_average_overhead(
|
void benchmark_timer_disable_subtracting_average_overhead(bool find_flag)
|
||||||
rtems_boolean find_flag
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
benchmark_timer_find_average_overhead = find_flag;
|
benchmark_timer_find_average_overhead = find_flag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ static uint32_t microseconds_divider;
|
|||||||
/* Interrupt period in microseconds */
|
/* Interrupt period in microseconds */
|
||||||
static uint32_t microseconds_per_int;
|
static uint32_t microseconds_per_int;
|
||||||
|
|
||||||
rtems_boolean benchmark_timer_find_average_overhead;
|
bool benchmark_timer_find_average_overhead;
|
||||||
|
|
||||||
/* benchmark_timer_initialize --
|
/* benchmark_timer_initialize --
|
||||||
* Initialize Timer 1 to operate as a RTEMS benchmark timer:
|
* Initialize Timer 1 to operate as a RTEMS benchmark timer:
|
||||||
@@ -246,13 +246,13 @@ benchmark_timer_read(void)
|
|||||||
* timer.
|
* timer.
|
||||||
*
|
*
|
||||||
* PARAMETERS:
|
* PARAMETERS:
|
||||||
* find_flag - boolean flag, TRUE if overhead must not be subtracted.
|
* find_flag - boolean flag, true if overhead must not be subtracted.
|
||||||
*
|
*
|
||||||
* RETURNS:
|
* RETURNS:
|
||||||
* none
|
* none
|
||||||
*/
|
*/
|
||||||
void
|
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;
|
benchmark_timer_find_average_overhead = find_flag;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user