From owner-cvs-src-old@FreeBSD.ORG Wed Jun 1 17:38:26 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 260951065674 for ; Wed, 1 Jun 2011 17:38:26 +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 137368FC19 for ; Wed, 1 Jun 2011 17:38:26 +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 p51HcP1v044989 for ; Wed, 1 Jun 2011 17:38:25 GMT (envelope-from mdf@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p51HcPLE044988 for cvs-src-old@freebsd.org; Wed, 1 Jun 2011 17:38:25 GMT (envelope-from mdf@repoman.freebsd.org) Message-Id: <201106011738.p51HcPLE044988@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:36:52 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 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:38:26 -0000 mdf 2011-06-01 17:36:52 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) share/man/man9 Makefile sbuf.9 sys/kern subr_sbuf.c sys/sys sbuf.h Log: SVN rev 222574 on 2011-06-01 17:36:52Z 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.357.2.17 +1 -0 src/share/man/man9/Makefile 1.27.2.3 +99 -7 src/share/man/man9/sbuf.9 1.31.2.3 +190 -29 src/sys/kern/subr_sbuf.c 1.16.2.2 +7 -2 src/sys/sys/sbuf.h