summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2008-08-08 13:43:56 +0000
committered <ed@FreeBSD.org>2008-08-08 13:43:56 +0000
commit7d2bdda0cd5d8adc83d5ae3dd62dd4911be922c1 (patch)
treedf59e33e63ce348943061a747ed7a6d1dffb400d
parent606619cde81fc5e7f78bd0cfcd9883e8f03acb07 (diff)
downloadFreeBSD-src-7d2bdda0cd5d8adc83d5ae3dd62dd4911be922c1.zip
FreeBSD-src-7d2bdda0cd5d8adc83d5ae3dd62dd4911be922c1.tar.gz
Remove D_NEEDGIANT from io(4).
There is no need to mark this device node to use Giant. The only architectures that use io(4) (i386 and amd64) only change a flag in td->td_frame, which is only accessed by curthread. Apart from this change, I think some fishy things may happen when using /dev/io in multithreaded applications. I haven't tested, but looking at the code, the flag doesn't get cleared when close() is called from another thread, but this may not be this important. I'm not removing D_NEEDGIANT from mem(4), because this driver isn't Giant safe at all (it calls GIANT_REQUIRED).
-rw-r--r--sys/dev/io/iodev.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/dev/io/iodev.c b/sys/dev/io/iodev.c
index 7c7ee9c..8c2cebd 100644
--- a/sys/dev/io/iodev.c
+++ b/sys/dev/io/iodev.c
@@ -52,7 +52,6 @@ static struct cdev *iodev;
static struct cdevsw io_cdevsw = {
.d_version = D_VERSION,
- .d_flags = D_NEEDGIANT,
.d_open = ioopen,
.d_close = ioclose,
.d_name = "io",
OpenPOWER on IntegriCloud