summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-01-29 22:54:19 +0000
committeralfred <alfred@FreeBSD.org>2002-01-29 22:54:19 +0000
commitb0fc10702ad9c73c2baea40625f42e4564b923d4 (patch)
treecc914e621766079bc3c13398056e23c719af7ce8 /usr.bin
parent80a5862e4638b3983879692876282ab4ceadd5ae (diff)
downloadFreeBSD-src-b0fc10702ad9c73c2baea40625f42e4564b923d4.zip
FreeBSD-src-b0fc10702ad9c73c2baea40625f42e4564b923d4.tar.gz
Attempt to fixup select(2) and poll(2), this should fix some races with
other threads as well as speed up the interfaces. To fix the race and accomplish the speedup, remove selholddrop and pollholddrop. The entire concept is somewhat bogus because holding the individual struct file pointers offers us no guarantees that another thread context won't close it on us thereby removing our access to our own reference. Selholddrop and pollholddrop also would do multiple locks and unlocks of mutexes _per-file_ in the fd arrays to be scanned, this needed to be sped up. Instead of using selholddrop and pollholddrop, simply hold the filedesc lock over the selscan and pollscan functions. This should protect us against close(2)'s on the files as reduce the multiple lock/unlock pairs per fd into a single lock over the filedesc.
Diffstat (limited to 'usr.bin')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud