35 #ifndef _RTE_CYCLES_H_
36 #define _RTE_CYCLES_H_
49 #define US_PER_S 1000000
50 #define NS_PER_S 1000000000
56 extern enum timer_source eal_timer_source;
73 static inline uint64_t
76 #ifdef RTE_LIBEAL_USE_HPET
87 rte_get_hpet_cycles(
void);
96 rte_get_hpet_hz(
void);
111 int rte_eal_hpet_init(
int make_default);
121 static inline uint64_t
124 #ifdef RTE_LIBEAL_USE_HPET
125 switch(eal_timer_source) {
129 #ifdef RTE_LIBEAL_USE_HPET
131 return rte_get_hpet_cycles();
132 default:
rte_panic(
"Invalid timer source specified\n");
143 static inline uint64_t
146 #ifdef RTE_LIBEAL_USE_HPET
147 switch(eal_timer_source) {
151 #ifdef RTE_LIBEAL_USE_HPET
153 return rte_get_hpet_hz();
154 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)