Changeset 191eec9 in rtems


Ignore:
Timestamp:
Apr 2, 2007, 9:52:14 PM (13 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
551db24
Parents:
dfa1f0bc
Message:

2007-04-02 Joel Sherrill <joel@…>

  • clock/ckinit.c: Eliminate TOD_Ticks_per_second variable.
Location:
c/src/lib/libbsp/i386/pc386
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/ChangeLog

    rdfa1f0bc r191eec9  
     12007-04-02      Joel Sherrill <joel@OARcorp.com>
     2
     3        * clock/ckinit.c: Eliminate TOD_Ticks_per_second variable.
     4
    152007-03-31      Ralf Corsépius <ralf.corsepius@rtems.org>
    26
  • c/src/lib/libbsp/i386/pc386/clock/ckinit.c

    rdfa1f0bc r191eec9  
    236236}
    237237
    238 /*-------------------------------------------------------------------------+
    239 | PLEASE NOTE: The following is directly transcribed from the go32 BSP for
    240 |              those who wish to use it with PENTIUM based machine. It needs
    241 |              to be correctly integrated with the rest of the code!!!
    242 +--------------------------------------------------------------------------*/
    243 
    244 #if 0 && defined(pentium)
    245 
    246 /* This can be used to get extremely accurate timing on a pentium. */
    247 /* It isn't supported. [bryce]                                     */
    248 
    249 #define HZ 90.0
    250 
    251 volatile long long Last_RDTSC;
    252 
    253 #define RDTSC()\
    254   ({ long long _now; __asm __volatile (".byte 0x0F,0x31":"=A"(_now)); _now; })
    255 
    256 long long Kernel_Time_ns( void )
    257 {
    258   extern uint32_t         _TOD_Ticks_per_second;
    259 
    260   unsigned  isrs_per_second = Clock_isrs_per_tick * _TOD_Ticks_per_second;
    261   long long now;
    262   int       flags;
    263 
    264   disable_intr(flags);
    265   now = 1e9 * Clock_driver_ticks / isrs_per_second +
    266         (RDTSC() - Last_RDTSC) * (1000.0/HZ);
    267   enable_intr(flags);
    268   return now;
    269 } /* Kernel_Time_ns */
    270 
    271 #endif /* 0 && pentium */
Note: See TracChangeset for help on using the changeset viewer.