Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jan 2001 09:37:32 -0800 (PST)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        "Jacques A. Vidrine" <n@nectar.com>
Cc:        mouss <usebsd@free.fr>, Garance A Drosihn <drosih@rpi.edu>, Luigi Rizzo <rizzo@aciri.org>, hackers@FreeBSD.ORG, wollman@khavrinen.lcs.mit.edu
Subject:   Re: [kernel patch] fcntl(...) to close many descriptors
Message-ID:  <200101291737.f0THbWg65163@earth.backplane.com>
References:  <200101290303.f0T33qg60603@earth.backplane.com> <200101281837.f0SIbGI24332@iguana.aciri.org> <200101290303.f0T33qg60603@earth.backplane.com> <p05010400b69ac2c32903@[128.113.24.47]> <4.3.0.20010129145823.023dfeb0@pop.free.fr> <20010129081455.B2390@hamlet.nectar.com>

next in thread | previous in thread | raw e-mail | index | archive | help
:> As for the "generic" syscall mechanism, I'd love it. I think that
:> there are many places where "names" would be good, instead of
:> hardcoded numbers. The only problem is to find a way to do that
:> without reducing performance. names are good. just try to see what it
:> would be if filenames were replaced by inodes. I think that having a
:> name-based mechanism makes it easier to add new syscalls or reject
:> deprecated ones.
:
:Performance is not much of an issue.  A perfect hash can be generated
:for syscall names.

    This is a bad idea.  One of the reasons why it is so easy for us to
    write portability modules for Sun, Linux, etc... is because of the
    hard-coded syscall numbers.  Syscalls work plenty well enough as they
    are now, we do not need a new mechansm.

:> (thanks to svr4 lobbying into posix:).
:> - add a closeall macro to call it.
:> 
:> this gives both aix and netbsd compat (and if the fcntl thing goes into 
:> netbsd, the compat would be full).
:
:I really do not care for using fcntl with this.  fcntl operates on a 
:single file descriptor -- F_CLOSEM mucks up the interface.
:
:-- 
:Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org

    mmap() is overloaded for MAP_ANON.  fcntl() may not be perfect, but
    it's better then adding a new syscall. 

    The libc closeall() code (I'm assuming that Mouss does not intend to
    actually use a #define) could do the fcntl(), and if it fails fall
    back to close()ing descriptors in a loop.  Perfect!

						-Matt



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




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