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

Function sbuf_clear

freebsd/kern/subr_sbuf.c:311–325  ·  view source on GitHub ↗

* Clear an sbuf and reset its position. */

Source from the content-addressed store, hash-verified

309 * Clear an sbuf and reset its position.
310 */
311void
312sbuf_clear(struct sbuf *s)
313{
314
315 assert_sbuf_integrity(s);
316 /* don't care if it's finished or not */
317 KASSERT(s->s_drain_func == NULL,
318 ("%s makes no sense on sbuf %p with drain", __func__, s));
319
320 SBUF_CLEARFLAG(s, SBUF_FINISHED);
321 s->s_error = 0;
322 s->s_len = 0;
323 s->s_rec_off = 0;
324 s->s_sect_len = 0;
325}
326
327/*
328 * Set the sbuf's end position to an arbitrary value.

Callers 9

print_registerFunction · 0.85
print_cpu_featuresFunction · 0.85
vfs_mountrootFunction · 0.85
sbuf_bcpyFunction · 0.85
sbuf_cpyFunction · 0.85
uipc_socket.cFile · 0.85
sysctl_kern_consoleFunction · 0.85
sys_abort2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected