diff options
author | Matthew D Fleming <mdf@FreeBSD.org> | 2011-01-27 00:34:12 +0000 |
---|---|---|
committer | Matthew D Fleming <mdf@FreeBSD.org> | 2011-01-27 00:34:12 +0000 |
commit | 00f0e671ff895f4cae35d3b53108ca2ddec0a526 (patch) | |
tree | e4eadeb1ff33d6db2e7b3001b1b8a9e9c21e2a2f /share | |
parent | 73d6f8516deb595b677d371f9271b93cd4891331 (diff) | |
download | src-00f0e671ff895f4cae35d3b53108ca2ddec0a526.tar.gz src-00f0e671ff895f4cae35d3b53108ca2ddec0a526.zip |
Explicitly wire the user buffer rather than doing it implicitly in
sbuf_new_for_sysctl(9). This allows using an sbuf with a SYSCTL_OUT
drain for extremely large amounts of data where the caller knows that
appropriate references are held, and sleeping is not an issue.
Inspired by: rwatson
Notes
Notes:
svn path=/head/; revision=217916
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/sbuf.9 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/share/man/man9/sbuf.9 b/share/man/man9/sbuf.9 index 798b1c890ffb..995cf83f9dd6 100644 --- a/share/man/man9/sbuf.9 +++ b/share/man/man9/sbuf.9 @@ -177,9 +177,9 @@ The function will set up an sbuf with a drain function to use .Fn SYSCTL_OUT when the internal buffer fills. -The sysctl old buffer will be wired, which allows for doing an -.Fn sbuf_printf -while holding a mutex. +Note that if the various functions which append to an sbuf are used while +a non-sleepable lock is held, the user buffer should be wired using +.Fn sysctl_wire_old_buffer . .Pp The .Fn sbuf_delete |