Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jun 2011 17:36:52 +0000 (UTC)
From:      Matthew D Fleming <mdf@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/share/man/man9 Makefile sbuf.9 src/sys/kern subr_sbuf.c src/sys/sys sbuf.h
Message-ID:  <201106011738.p51HcPLE044988@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106011738.p51HcPLE044988>