Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Callouts allow drivers to asynchronously execute a function after a specified amount of time (or at regular intervals). These functions are known as callout functions.
The FreeBSD kernel provides the following seven functions for working with callouts:
#include <sys/types.h> #include <sys/systm.h> typedef void timeout_t (void *); void callout_init(struct callout*c, int
mpsafe); void callout_init_mtx(struct callout *c, struct mtx
*mtx, int
flags); void callout_init_rw(struct callout *c, struct rwlock
*rw, int
flags); int callout_stop(struct callout *c); int callout_drain(struct callout *c); int callout_reset(struct callout
*c, int
ticks, timeout_t
*func, void
*arg); int callout_schedule(struct callout *c, int ticks);