MCPcopy Create free account
hub / github.com/F-Stack/f-stack / timer1_cb

Function timer1_cb

dpdk/examples/timer/main.c:43–56  ·  view source on GitHub ↗

timer1 callback. 8< */

Source from the content-addressed store, hash-verified

41
42/* timer1 callback. 8< */
43static void
44timer1_cb(__rte_unused struct rte_timer *tim,
45 __rte_unused void *arg)
46{
47 unsigned lcore_id = rte_lcore_id();
48 uint64_t hz;
49
50 printf("%s() on lcore %u\n", __func__, lcore_id);
51
52 /* reload it on another lcore */
53 hz = rte_get_timer_hz();
54 lcore_id = rte_get_next_lcore(lcore_id, 0, 1);
55 rte_timer_reset(tim, hz/3, SINGLE, lcore_id, timer1_cb, NULL);
56}
57/* >8 End of timer1 callback. */
58
59static __rte_noreturn int

Callers

nothing calls this directly

Calls 4

rte_lcore_idFunction · 0.85
rte_get_next_lcoreFunction · 0.85
rte_timer_resetFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected