Replace the linear search in file descriptor allocation with an O(log N)
authorJeffrey Hsu <hsu@dragonflybsd.org>
Tue, 21 Jun 2005 23:58:53 +0000 (23:58 +0000)
committerJeffrey Hsu <hsu@dragonflybsd.org>
Tue, 21 Jun 2005 23:58:53 +0000 (23:58 +0000)
commit6990831969dfb27b4450d9696f7f9676d0697b54
tree0140f52c0515787687700320bb389f42ab8b0d18
parent31ae001b6a8ec19b6aed5b362c6b7a15da6b9f5b
Replace the linear search in file descriptor allocation with an O(log N)
algorithm based on full in-place binary search trees augmented with
subtree free file descriptor counts.

Idea from: Solaris
sys/dev/misc/streams/streams.c
sys/kern/init_main.c
sys/kern/kern_descrip.c
sys/kern/sys_pipe.c
sys/kern/uipc_syscalls.c
sys/kern/vfs_syscalls.c
sys/sys/filedesc.h