#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;
}