#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <sys/queue.h>
static uint64_t timer_resolution_cycles;
static void
{
static unsigned counter = 0;
printf("%s() on lcore %u\n", __func__, lcore_id);
if ((counter ++) == 20)
}
static void
{
uint64_t hz;
printf("%s() on lcore %u\n", __func__, lcore_id);
}
{
uint64_t prev_tsc = 0, cur_tsc, diff_tsc;
unsigned lcore_id;
printf("Starting mainloop on core %u\n", lcore_id);
while (1) {
diff_tsc = cur_tsc - prev_tsc;
if (diff_tsc > timer_resolution_cycles) {
prev_tsc = cur_tsc;
}
}
}
int
main(int argc, char **argv)
{
int ret;
uint64_t hz;
unsigned lcore_id;
if (ret < 0)
timer_resolution_cycles = hz * 10 / 1000;
}
(void) lcore_mainloop(NULL);
return 0;
}
static uint64_t rte_get_timer_hz(void)
static uint64_t rte_get_timer_cycles(void)
int rte_eal_init(int argc, char **argv)
int rte_eal_cleanup(void)
int rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned worker_id)
#define RTE_LCORE_FOREACH_WORKER(i)
unsigned int rte_get_next_lcore(unsigned int i, int skip_main, int wrap)
static unsigned rte_lcore_id(void)
void rte_timer_init(struct rte_timer *tim)
int rte_timer_stop(struct rte_timer *tim)
int rte_timer_reset(struct rte_timer *tim, uint64_t ticks, enum rte_timer_type type, unsigned tim_lcore, rte_timer_cb_t fct, void *arg)
int rte_timer_manage(void)
int rte_timer_subsystem_init(void)