Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Feb 2001 07:57:17 +0100
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        "Kenneth D. Merry" <ken@kdm.org>, arch@FreeBSD.ORG
Subject:   Re: sbufs in userland 
Message-ID:  <26415.983257037@critter>
In-Reply-To: Your message of "Tue, 27 Feb 2001 17:16:27 %2B1100." <Pine.BSF.4.21.0102271701190.23480-100000@besplex.bde.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.21.0102271701190.23480-100000@besplex.bde.org>, Bruce Ev
ans writes:

>So everyone agrees that sbufs are a mistake :-).  The kernel should use
>the same interfaces as userland for general things like printf() and
>malloc() (oops, too late), if it needs such interfaces at all, so that
>programmers can reuse their knowledge of userland.  However, I doubt
>that general string handling in the kernel is needed often enough to
>justify having sbuf or funopen.

No we dont argee on that.

*if* the kernel can use the same API it should, but most often it
can't.

strlen() comes to mind as an API where it can't use it.  In the
kernel strlen should return an error code if it tries to access
non-accessible memory, rather than core-dumping as it does in
userland.

--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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