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