sbuf.9 (217830) | sbuf.9 (217916) |
---|---|
1.\"- 2.\" Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Co�dan Sm�rgrav 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" | 1.\"- 2.\" Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Co�dan Sm�rgrav 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" |
26.\" $FreeBSD: head/share/man/man9/sbuf.9 217830 2011-01-25 17:39:52Z mdf $ | 26.\" $FreeBSD: head/share/man/man9/sbuf.9 217916 2011-01-27 00:34:12Z mdf $ |
27.\" 28.Dd January 25, 2011 29.Dt SBUF 9 30.Os 31.Sh NAME 32.Nm sbuf , 33.Nm sbuf_new , 34.Nm sbuf_new_auto , --- 137 unchanged lines hidden (view full) --- 172and 173.Dv SBUF_AUTOEXTEND . 174.Pp 175The 176.Fn sbuf_new_for_sysctl 177function will set up an sbuf with a drain function to use 178.Fn SYSCTL_OUT 179when the internal buffer fills. | 27.\" 28.Dd January 25, 2011 29.Dt SBUF 9 30.Os 31.Sh NAME 32.Nm sbuf , 33.Nm sbuf_new , 34.Nm sbuf_new_auto , --- 137 unchanged lines hidden (view full) --- 172and 173.Dv SBUF_AUTOEXTEND . 174.Pp 175The 176.Fn sbuf_new_for_sysctl 177function will set up an sbuf with a drain function to use 178.Fn SYSCTL_OUT 179when the internal buffer fills. |
180The sysctl old buffer will be wired, which allows for doing an 181.Fn sbuf_printf 182while holding a mutex. | 180Note that if the various functions which append to an sbuf are used while 181a non-sleepable lock is held, the user buffer should be wired using 182.Fn sysctl_wire_old_buffer . |
183.Pp 184The 185.Fn sbuf_delete 186function clears the 187.Fa sbuf 188and frees any memory allocated for it. 189There must be a call to 190.Fn sbuf_delete --- 321 unchanged lines hidden --- | 183.Pp 184The 185.Fn sbuf_delete 186function clears the 187.Fa sbuf 188and frees any memory allocated for it. 189There must be a call to 190.Fn sbuf_delete --- 321 unchanged lines hidden --- |