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

Function sbuf_set_drain

freebsd/kern/subr_sbuf.c:371–381  ·  view source on GitHub ↗

* Set up a drain function and argument on an sbuf to flush data to * when the sbuf buffer overflows. */

Source from the content-addressed store, hash-verified

369 * when the sbuf buffer overflows.
370 */
371void
372sbuf_set_drain(struct sbuf *s, sbuf_drain_func *func, void *ctx)
373{
374
375 assert_sbuf_state(s, 0);
376 assert_sbuf_integrity(s);
377 KASSERT(func == s->s_drain_func || s->s_len == 0,
378 ("Cannot change drain to %p on non-empty sbuf %p", func, s));
379 s->s_drain_func = func;
380 s->s_drain_arg = ctx;
381}
382
383/*
384 * Call the drain and process the return.

Callers 14

fail_point_sysctlFunction · 0.85
fail_point_sysctl_statusFunction · 0.85
device_printfFunction · 0.85
sysctl_warn_reuseFunction · 0.85
sbuf_new_for_sysctlFunction · 0.85
preload_dumpFunction · 0.85
__elfN(corehdr)Function · 0.85
note_procstat_filesFunction · 0.85
note_procstat_vmmapFunction · 0.85
witness_checkorderFunction · 0.85
subr_witness.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected