HomeFreeBSD

Implement sbuf_prf(), which takes an sbuf and outputs it

Description

Implement sbuf_prf(), which takes an sbuf and outputs it
to stdout in the non-kernel case and to the console+log
in the kernel case. For the kernel case it hooks the
putbuf() machinery underneath printf(9) so that the buffer
is written completely atomically and without a copy into
another temporary buffer. This is useful for fixing
compound console/log messages that become broken and
interleaved when multiple threads are competing for the
console.

Reviewed by: ken, imp
Sponsored by: Netflix

Details

Provenance
scottlAuthored on
Reviewer
ken
Parents
rS314396: Properly indent a default: label and avoid crashing when running
Branches
Unknown
Tags
Unknown