From owner-cvs-src-old@FreeBSD.ORG Wed Jun 1 17:41:50 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 998A31065673 for ; Wed, 1 Jun 2011 17:41:50 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 86E0F8FC08 for ; Wed, 1 Jun 2011 17:41:50 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p51Hfow7045301 for ; Wed, 1 Jun 2011 17:41:50 GMT (envelope-from mdf@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p51HfoVN045300 for cvs-src-old@freebsd.org; Wed, 1 Jun 2011 17:41:50 GMT (envelope-from mdf@repoman.freebsd.org) Message-Id: <201106011741.p51HfoVN045300@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to mdf@repoman.freebsd.org using -f From: Matthew D Fleming Date: Wed, 1 Jun 2011 17:40:59 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_7 Subject: cvs commit: src/share/man/man9 Makefile sbuf.9 src/sys/kern subr_sbuf.c src/sys/sys sbuf.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2011 17:41:50 -0000 mdf 2011-06-01 17:40:59 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) share/man/man9 Makefile sbuf.9 sys/kern subr_sbuf.c sys/sys sbuf.h Log: SVN rev 222575 on 2011-06-01 17:40:59Z by mdf MFC r212365, r212367: r212365: Refactor sbuf code so that most uses of sbuf_extend() are in a new sbuf_put_byte(). This makes it easier to add drain functionality when a buffer would overflow as there are fewer code points. r212367: Add drain functionality to sbufs. The drain is a function that is called when the sbuf internal buffer is filled. For kernel sbufs with a drain, the internal buffer will never be expanded. For userland sbufs with a drain, the internal buffer may still be expanded by sbuf_[v]printf(3). Sbufs now have three basic uses: 1) static string manipulation. Overflow is marked. 2) dynamic string manipulation. Overflow triggers string growth. 3) drained string manipulation. Overflow triggers draining. In all cases the manipulation is 'safe' in that overflow is detected and managed. Note that r212367 had to be minorly re-implemented to dynamically allocate space for a function pointer, a void * argument, and an int error, to not break the ABI/KBI. Revision Changes Path 1.310.2.14 +1 -0 src/share/man/man9/Makefile 1.26.2.3 +99 -7 src/share/man/man9/sbuf.9 1.30.2.3 +190 -29 src/sys/kern/subr_sbuf.c 1.14.18.3 +7 -2 src/sys/sys/sbuf.h