Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/cycle.h

    rdf4ed85 r7a0359b  
    3636#define KERN_amd64_CYCLE_H_
    3737
    38 extern uint64_t get_cycle(void);
     38#include <trace.h>
     39
     40NO_TRACE static inline uint64_t get_cycle(void)
     41{
     42        uint32_t lower;
     43        uint32_t upper;
     44       
     45        asm volatile (
     46                "rdtsc\n"
     47                : "=a" (lower),
     48                  "=d" (upper)
     49        );
     50       
     51        return ((uint64_t) lower) | (((uint64_t) upper) << 32);
     52}
    3953
    4054#endif
Note: See TracChangeset for help on using the changeset viewer.