From owner-freebsd-arch@FreeBSD.ORG Wed Sep 8 23:09:18 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 E3D0C106566B for ; Wed, 8 Sep 2010 23:09:18 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9160E8FC12 for ; Wed, 8 Sep 2010 23:09:18 +0000 (UTC) Received: by gxk24 with SMTP id 24so423202gxk.13 for ; Wed, 08 Sep 2010 16:09:17 -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:content-transfer-encoding; bh=o/out9nuBAGVMFyGw+crSe15++WDmzKzM3cAYU7oKj4=; b=JQB9YEKaQect5hp8W/ZcItj7b0T31ypYBwaLHoXickysoo1BoGww+m5v+L/53WaeCN IH7MSqwOlJzoxr/gpoFDroctk8Ws+/0GIv36ZWXf526J8SOasKW51Y+Unz0CCNSzeQFa QSYyEJ/sI8OrJRJZ7pV2T6A0RDWsvUGzBDPHs= 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 :content-transfer-encoding; b=Z1cZ4EpcBsrUQ3FbX79hY9Vd8jbIvXLTQTy8kc/jbReHpxyu1RRDXJm/ny/4UTP6Hc 2ppIavuAAijVa0tdsLwNogufTQEpWkc3kooAJmJhPvlz1rgY//2145sFKrASI5r0Q1fT 6pK2E8MIGzIH9Nd1aSDNECZgcbSLjhBFzT2Gg= MIME-Version: 1.0 Received: by 10.100.235.10 with SMTP id i10mr589275anh.1.1283987355059; Wed, 08 Sep 2010 16:09:15 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.100.126.20 with HTTP; Wed, 8 Sep 2010 16:09:14 -0700 (PDT) In-Reply-To: References: <67049.1283963396@critter.freebsd.dk> Date: Wed, 8 Sep 2010 16:09:14 -0700 X-Google-Sender-Auth: ET7Uk2_GF8BoVH4X_jNeP200K_I Message-ID: From: mdf@FreeBSD.org To: Gordon Tetlow Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Poul-Henning Kamp , 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 23:09:19 -0000 On Wed, Sep 8, 2010 at 3:35 PM, Gordon Tetlow wrote: > 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. =A0 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 :-) =A0The 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 se= e > 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. The sbuf(9) man page describes the library well. It's in lib/libsbuf, so link a userland application with -lsbuf. Cheers, matthew