From owner-freebsd-arch@FreeBSD.ORG Wed Sep 8 22:57:41 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1A7710656B0; Wed, 8 Sep 2010 22:57:41 +0000 (UTC) (envelope-from gordon.tetlow@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 878998FC13; Wed, 8 Sep 2010 22:57:41 +0000 (UTC) Received: by iwn34 with SMTP id 34so502228iwn.13 for ; Wed, 08 Sep 2010 15:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=B83+zSvSEuZ/qbMNYGDoX9kUVwY/aGQPg93ITu+QwC4=; b=VIbUiTSrHIykHOFW5usY9/Iljtt2wsbq11erD4S1JeXaq3vtyId9WYB1F1QtbxZ+N6 6ggEx8gWpppYZiu6ozaVmFpUw8Sf/HyuVoL6/Fm3V1OpMCCn9ltBPzo/n2USGkDuW7Gi i7N+6aBiFVTuezX8BIzWv4O+ixjEOK//b4IqI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=e/AMUBhO96WjbqWIx4BjjJL5MQCDy2yRzTDZ4mq9K9eD1DzabGoKpNS7JSkY7xQtQi lx0P25Toh6wXbF4cd/xJamzDKsKQtUOUxanNUSn2/utLqOZfJztBHy3YpSNY4qB/DvjN ECMTd3+mqeSUUvJCHS1EJvYnEJgdu+NIUKTYw= MIME-Version: 1.0 Received: by 10.231.173.144 with SMTP id p16mr10469932ibz.108.1283985343927; Wed, 08 Sep 2010 15:35:43 -0700 (PDT) Sender: gordon.tetlow@gmail.com Received: by 10.231.156.78 with HTTP; Wed, 8 Sep 2010 15:35:43 -0700 (PDT) In-Reply-To: <67049.1283963396@critter.freebsd.dk> References: <67049.1283963396@critter.freebsd.dk> Date: Wed, 8 Sep 2010 15:35:43 -0700 X-Google-Sender-Auth: qxdUkGie14kDmUWe5g0yMYelUl8 Message-ID: From: Gordon Tetlow To: Poul-Henning Kamp Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: mdf@freebsd.org, FreeBSD Arch Subject: Re: Extending sbufs with a drain X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2010 22:57:42 -0000 On Wed, Sep 8, 2010 at 9:29 AM, Poul-Henning Kamp wrote: > In message , > mdf@ > FreeBSD.org writes: > >> For one thing, sbuf is not a kernel facility, it is a general purpose > >> string editing library which is also used outside FreeBSD. If > >> we add the drain facility it should work in both userland and kernel. > > > >Given that sys/sbuf.h is included in 100+ kernel files and 4 > >user-space files, [...] > > That is probably more an indication that our userland is largely > unchanged from 1995, whereas as everybody loves to hack up the > kernel :-) The various people who have told me they adopted sbufs > have been very happy with them in userland. I would think that is more likely a result of the only documentation I see for sbuf always refers to kernel implementation (sbuf(9), I don't see any documentation for sbuf(3). Can you give some pointers? I've always hated string manipulation in C, if I can find another way to do it, I'm all for it. Gordon