forked from Imagelibrary/rtems
Convert to "bool".
This commit is contained in:
@@ -231,11 +231,11 @@ i386_timer_exit(void)
|
|||||||
void
|
void
|
||||||
i386_timer_initialize(void)
|
i386_timer_initialize(void)
|
||||||
{
|
{
|
||||||
static rtems_boolean First = TRUE;
|
static bool First = true;
|
||||||
|
|
||||||
if (First)
|
if (First)
|
||||||
{
|
{
|
||||||
First = FALSE;
|
First = false;
|
||||||
|
|
||||||
atexit(Timer_exit); /* Try not to hose the system at exit. */
|
atexit(Timer_exit); /* Try not to hose the system at exit. */
|
||||||
if (!i386_set_idt_entry (&timer_raw_irq_data)) {
|
if (!i386_set_idt_entry (&timer_raw_irq_data)) {
|
||||||
@@ -329,7 +329,7 @@ Timer_exit(void)
|
|||||||
| Returns: Nothing.
|
| Returns: Nothing.
|
||||||
+--------------------------------------------------------------------------*/
|
+--------------------------------------------------------------------------*/
|
||||||
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;
|
||||||
} /* benchmark_timer_disable_subtracting_average_overhead */
|
} /* benchmark_timer_disable_subtracting_average_overhead */
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
volatile uint32_t Ttimer_val; /* Updated from ISR!!! */
|
volatile uint32_t Ttimer_val; /* Updated from ISR!!! */
|
||||||
rtems_boolean benchmark_timer_find_average_overhead;
|
bool benchmark_timer_find_average_overhead;
|
||||||
|
|
||||||
extern void timerisr(void);
|
extern void timerisr(void);
|
||||||
|
|
||||||
@@ -99,11 +99,11 @@ void Timer_exit(void)
|
|||||||
void benchmark_timer_initialize(void)
|
void benchmark_timer_initialize(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
static rtems_boolean First = TRUE;
|
static bool First = true;
|
||||||
|
|
||||||
if (First)
|
if (First)
|
||||||
{
|
{
|
||||||
First = FALSE;
|
First = false;
|
||||||
|
|
||||||
if (!i386_get_current_idt_entry (&old_raw_irq_data)) {
|
if (!i386_get_current_idt_entry (&old_raw_irq_data)) {
|
||||||
printk("benchmark_timer_initialize: failed to get old raw irq entry.\n");
|
printk("benchmark_timer_initialize: failed to get old raw irq entry.\n");
|
||||||
@@ -155,7 +155,7 @@ int benchmark_timer_read(void)
|
|||||||
clicks = (msb << 8) | lsb;
|
clicks = (msb << 8) | lsb;
|
||||||
total = Ttimer_val * US_PER_ISR + (US_PER_ISR - clicks);
|
total = Ttimer_val * US_PER_ISR + (US_PER_ISR - clicks);
|
||||||
|
|
||||||
if ( benchmark_timer_find_average_overhead == 1 )
|
if ( benchmark_timer_find_average_overhead == true )
|
||||||
return total; /* in one microsecond units */
|
return total; /* in one microsecond units */
|
||||||
else if ( total < LEAST_VALID )
|
else if ( total < LEAST_VALID )
|
||||||
return 0; /* below timer resolution */
|
return 0; /* below timer resolution */
|
||||||
@@ -164,7 +164,7 @@ int benchmark_timer_read(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void benchmark_timer_disable_subtracting_average_overhead(
|
void benchmark_timer_disable_subtracting_average_overhead(
|
||||||
rtems_boolean find_flag
|
bool find_flag
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
benchmark_timer_find_average_overhead = find_flag;
|
benchmark_timer_find_average_overhead = find_flag;
|
||||||
|
|||||||
Reference in New Issue
Block a user