| CALLBACK(9) | Kernel Developer's Manual | CALLBACK(9) |
callback —
#include <sys/callback.h>
void
callback_head_init(struct
callback_head *ch, int
ipl);
void
callback_head_destroy(struct
callback_head *ch);
void
callback_register(struct
callback_head *ch, struct
callback_entry *ce, void
*obj, int (*fn)(struct
callback_entry *, void *, void *));
void
callback_unregister(struct
callback_head *ch, struct
callback_entry *ce);
int
callback_run_roundrobin(struct
callback_head *ch, void
*arg);
callback interface allows lower-level layer
code to execute a registered function, or set of functions, from the
higher-level layer.
Registered functions must return one of these constants:
CALLBACK_CHAIN_CONTINUECALLBACK_CHAIN_ABORTThe callback_entry structure is an entry, normally associated with the higher-level object. It contains the internal data of the callback interface.
callback_head_init(ch,
ipl)callback_head_destroy(ch)callback_register(ch,
ce, obj,
fn)callback_unregister(ch,
ce)callback_run_roundrobin(ch,
arg)callback interface is implemented within the file
sys/kern/subr_callback.c.
| October 28, 2009 | NetBSD 9.4 |