RT_TIMER_ADD(9)

πŸ“¦ in nixpkgs unstable

Hii bestie! Welcome to RT_TIMER_ADD(9) from the Kernel Developer's Manual πŸ’– β€” this one's the route timer queues interface, and she's lowkey iconic.

✨ NAME ✨

rt_timer_add, rt_timer_remove_all, rt_timer_get_expire, rt_timer_queue_init, rt_timer_queue_change, rt_timer_queue_flush, rt_timer_queue_count β€” route timer queues interface

🌸 SYNOPSIS 🌸

Okay so first, the include and the exact signatures, no cap:

       #include <net/route.h>

       int
       rt_timer_add(struct rtentry *rt, struct rttimer_queue *queue,
           u_int rtableid);

       void
       rt_timer_remove_all(struct rtentry *rt);

       time_t
       rt_timer_get_expire(const struct rtentry *rt);

       void
       rt_timer_queue_init(struct rttimer_queue *rtq, int timeout,
           void (*func)(struct rtentry *, u_int));

       void
       rt_timer_queue_change(struct rttimer_queue *rtq, int timeout);

       void
       rt_timer_queue_flush(struct rttimer_queue *rtq);

       unsigned long
       rt_timer_queue_count(struct rttimer_queue *rtq);

πŸ’… DESCRIPTION πŸ’…

The rt_timer subsystem queues routing-related functions for asynchronous execution in the future β€” future vibes only, bestie ✨.

  • rt_timer_add() β€” allocates an rttimer_queue rtq to be called on rt using the timeout of queue. If an action already exists, it will be replaced with the new one.
  • rt_timer_remove_all() β€” removes all timeouts associated with rt from all routing timer queues.
  • rt_timer_get_expire() β€” returns the current expiry time in seconds.
  • rt_timer_queue_init() β€” creates a timer queue with a timeout of timeout seconds.
  • rt_timer_queue_change() β€” sets the timeout for rtq to timeout seconds.
  • rt_timer_queue_flush() β€” removes all timeouts from the routing timer queue rtq, executes their associated callback and destroys it.
  • rt_timer_queue_count() β€” returns the number of timers present in the queue rtq.

🫢 CONTEXT 🫢

Vibe check: rt_timer_add(), rt_timer_remove_all(), rt_timer_get_expire(), rt_timer_queue_init(), rt_timer_queue_change(), rt_timer_queue_flush() and rt_timer_queue_count() can be called during autoconf, from process context, or from interrupt context. Slay, they're flexible like that πŸ’….

😭 ERRORS 😭

rt_timer_add() may fail with ENOBUFS if memory could not be allocated for the timeout. Not the glow-up we wanted, but now you know, fr fr.

πŸ¦‹ SEE ALSO πŸ¦‹

Debian is the source/version here, dated June 20, 2023 β€” bye bestie, go queue those timers and stay hydrated πŸ’…πŸ’–

πŸ“¦ where this page comes from
  • nixpkgs unstable: cvs-export
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms