64 #ifndef _RTE_CYCLES_H_
65 #define _RTE_CYCLES_H_
78 #define US_PER_S 1000000
79 #define NS_PER_S 1000000000
85 extern enum timer_source eal_timer_source;
102 static inline uint64_t
105 #ifdef RTE_LIBEAL_USE_HPET
116 rte_get_hpet_cycles(
void);
125 rte_get_hpet_hz(
void);
140 int rte_eal_hpet_init(
int make_default);
150 static inline uint64_t
153 switch(eal_timer_source) {
157 #ifdef RTE_LIBEAL_USE_HPET
158 return rte_get_hpet_cycles();
160 default:
rte_panic(
"Invalid timer source specified\n");
170 static inline uint64_t
173 switch(eal_timer_source) {
177 #ifdef RTE_LIBEAL_USE_HPET
178 return rte_get_hpet_hz();
180 default:
rte_panic(
"Invalid timer source specified\n");
void rte_delay_us_block(unsigned int us)
void rte_delay_us_callback_register(void(*userfunc)(unsigned int))
static void rte_delay_ms(unsigned ms)
static uint64_t rte_get_timer_hz(void)
void(* rte_delay_us)(unsigned int us)
static uint64_t rte_get_tsc_cycles(void)
uint64_t rte_get_tsc_hz(void)
static uint64_t rte_get_timer_cycles(void)