From owner-cvs-all@FreeBSD.ORG Thu Jan 15 02:15:05 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D77D316A4CE; Thu, 15 Jan 2004 02:15:05 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E605143D4C; Thu, 15 Jan 2004 02:15:04 -0800 (PST) (envelope-from des@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i0FAF40B009869; Thu, 15 Jan 2004 02:15:04 -0800 (PST) (envelope-from des@repoman.freebsd.org) Received: (from des@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i0FAF49u009868; Thu, 15 Jan 2004 02:15:04 -0800 (PST) (envelope-from des) Message-Id: <200401151015.i0FAF49u009868@repoman.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 15 Jan 2004 02:15:04 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern init_main.c kern_descrip.c sys_pipe.c uipc_syscalls.c uipc_usrreq.c vfs_syscalls.c src/sys/sys filedesc.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2004 10:15:06 -0000 des 2004/01/15 02:15:04 PST FreeBSD src repository Modified files: sys/kern init_main.c kern_descrip.c sys_pipe.c uipc_syscalls.c uipc_usrreq.c vfs_syscalls.c sys/sys filedesc.h Log: New file descriptor allocation code, derived from similar code introduced in OpenBSD by Niels Provos. The patch introduces a bitmap of allocated file descriptors which is used to locate available descriptors when a new one is needed. It also moves the task of growing the file descriptor table out of fdalloc(), reducing complexity in both fdalloc() and do_dup(). Debts of gratitude are owed to tjr@ (who provided the original patch on which this work is based), grog@ (for the gdb(4) man page) and rwatson@ (for assistance with pxeboot(8)). Revision Changes Path 1.239 +2 -0 src/sys/kern/init_main.c 1.219 +285 -243 src/sys/kern/kern_descrip.c 1.163 +1 -0 src/sys/kern/sys_pipe.c 1.169 +4 -0 src/sys/kern/uipc_syscalls.c 1.114 +1 -1 src/sys/kern/uipc_usrreq.c 1.336 +3 -0 src/sys/kern/vfs_syscalls.c 1.54 +13 -6 src/sys/sys/filedesc.h