2007-04-02 Joel Sherrill <joel@OARcorp.com>

* clock/ckinit.c: Eliminate TOD_Ticks_per_second variable.
This commit is contained in:
Joel Sherrill
2007-04-02 21:52:14 +00:00
parent dfa1f0bcad
commit 191eec9320
2 changed files with 4 additions and 34 deletions
+4
View File
@@ -1,3 +1,7 @@
2007-04-02 Joel Sherrill <joel@OARcorp.com>
* clock/ckinit.c: Eliminate TOD_Ticks_per_second variable.
2007-03-31 Ralf Corsépius <ralf.corsepius@rtems.org>
* ne2000/ne2000.c (ne_interrupt_handler): Avoid warning.
@@ -235,37 +235,3 @@ void Clock_exit()
BSP_remove_rtems_irq_handler (&clockIrqData);
}
/*-------------------------------------------------------------------------+
| PLEASE NOTE: The following is directly transcribed from the go32 BSP for
| those who wish to use it with PENTIUM based machine. It needs
| to be correctly integrated with the rest of the code!!!
+--------------------------------------------------------------------------*/
#if 0 && defined(pentium)
/* This can be used to get extremely accurate timing on a pentium. */
/* It isn't supported. [bryce] */
#define HZ 90.0
volatile long long Last_RDTSC;
#define RDTSC()\
({ long long _now; __asm __volatile (".byte 0x0F,0x31":"=A"(_now)); _now; })
long long Kernel_Time_ns( void )
{
extern uint32_t _TOD_Ticks_per_second;
unsigned isrs_per_second = Clock_isrs_per_tick * _TOD_Ticks_per_second;
long long now;
int flags;
disable_intr(flags);
now = 1e9 * Clock_driver_ticks / isrs_per_second +
(RDTSC() - Last_RDTSC) * (1000.0/HZ);
enable_intr(flags);
return now;
} /* Kernel_Time_ns */
#endif /* 0 && pentium */