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

Function timer_get_prev_entries

dpdk/lib/timer/rte_timer.c:347–360  ·  view source on GitHub ↗

* For a given time value, get the entries at each level which * are <= that time value. */

Source from the content-addressed store, hash-verified

345 * are <= that time value.
346 */
347static void
348timer_get_prev_entries(uint64_t time_val, unsigned tim_lcore,
349 struct rte_timer **prev, struct priv_timer *priv_timer)
350{
351 unsigned lvl = priv_timer[tim_lcore].curr_skiplist_depth;
352 prev[lvl] = &priv_timer[tim_lcore].pending_head;
353 while(lvl != 0) {
354 lvl--;
355 prev[lvl] = prev[lvl+1];
356 while (prev[lvl]->sl_next[lvl] &&
357 prev[lvl]->sl_next[lvl]->expire <= time_val)
358 prev[lvl] = prev[lvl]->sl_next[lvl];
359 }
360}
361
362/*
363 * Given a timer node in the skiplist, find the previous entries for it at

Callers 4

timer_addFunction · 0.85
__rte_timer_manageFunction · 0.85
rte_timer_alt_manageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected