Changeset c6016f1 in rtems


Ignore:
Timestamp:
Dec 3, 2008, 5:29:13 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.9
Children:
22629ee
Parents:
dcbc0a89
Message:

2008-12-03 Joel Sherrill <joel.sherrill@…>

Michael South <msouth@…>

PR 1344/bsps

  • cpuModel.h: Add use of TSC for nanoseconds granularity. i8254 is very slow on some systems. TSC use is auto-detected by default.
Location:
c/src/lib/libcpu/i386
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/i386/ChangeLog

    rdcbc0a89 rc6016f1  
     12008-12-03      Joel Sherrill <joel.sherrill@OARcorp.com>
     2                Michael South <msouth@msouth.org>
     3
     4        PR 1344/bsps
     5        * cpuModel.h: Add use of TSC for nanoseconds granularity. i8254 is very
     6        slow on some systems. TSC use is auto-detected by default.
     7
    182008-08-16      Ralf Corsépius <ralf.corsepius@rtems.org>
    29
  • c/src/lib/libcpu/i386/cpuModel.h

    rdcbc0a89 rc6016f1  
    3232extern void printCpuInfo(); /* Display this information on console in ascii form */
    3333
     34/* determine if the CPU has a TSC */
     35#define x86_has_tsc() \
     36  (x86_capability & (1 << 4))
     37
     38static inline unsigned long long
     39rdtsc(void)
     40{
     41  /* Return the value of the on-chip cycle counter. */
     42  unsigned long long result;
     43  asm volatile(".byte 0x0F, 0x31" : "=A" (result));
     44  return result;
     45} /* rdtsc */
     46
     47
    3448#endif
Note: See TracChangeset for help on using the changeset viewer.