Changes in kernel/arch/amd64/include/cycle.h [7a0359b:df4ed85] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/cycle.h
r7a0359b rdf4ed85 36 36 #define KERN_amd64_CYCLE_H_ 37 37 38 #include <trace.h> 39 40 NO_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 } 38 extern uint64_t get_cycle(void); 53 39 54 40 #endif
Note:
See TracChangeset
for help on using the changeset viewer.