aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/sys_generic.c
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2007-12-30 01:42:15 +0000
committerJeff Roberson <jeff@FreeBSD.org>2007-12-30 01:42:15 +0000
commit397c19d1753d210247d77eb3ca33d1c7c1eb2fa9 (patch)
tree0f2354bfc200294c2629e6ecfba76e364beda579 /sys/kern/sys_generic.c
parent2a79fd39b4cf409d2c0bd7a449d7f3e91d7b9007 (diff)
downloadsrc-397c19d1753d210247d77eb3ca33d1c7c1eb2fa9.tar.gz
src-397c19d1753d210247d77eb3ca33d1c7c1eb2fa9.zip
Notes
Diffstat (limited to 'sys/kern/sys_generic.c')
-rw-r--r--sys/kern/sys_generic.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index 0800c08073e6..9c800f37d342 100644
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -646,21 +646,17 @@ kern_ioctl(struct thread *td, int fd, u_long com, caddr_t data)
FILEDESC_XUNLOCK(fdp);
goto out;
case FIONBIO:
- FILE_LOCK(fp);
if ((tmp = *(int *)data))
- fp->f_flag |= FNONBLOCK;
+ atomic_set_int(&fp->f_flag, FNONBLOCK);
else
- fp->f_flag &= ~FNONBLOCK;
- FILE_UNLOCK(fp);
+ atomic_clear_int(&fp->f_flag, FNONBLOCK);
data = (void *)&tmp;
break;
case FIOASYNC:
- FILE_LOCK(fp);
if ((tmp = *(int *)data))
- fp->f_flag |= FASYNC;
+ atomic_set_int(&fp->f_flag, FASYNC);
else
- fp->f_flag &= ~FASYNC;
- FILE_UNLOCK(fp);
+ atomic_clear_int(&fp->f_flag, FASYNC);
data = (void *)&tmp;
break;
}