diff options
author | phk <phk@FreeBSD.org> | 2004-11-13 11:53:02 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-11-13 11:53:02 +0000 |
commit | 216166ee0de39b10ba8e60f4115d65e1251ff29f (patch) | |
tree | 15f70d195895ba0b6c385bc2892b07302db4faaa /sys/compat | |
parent | 32d92d3a1a6bf10d16cd48469ec464510bd8ff2f (diff) | |
download | FreeBSD-src-216166ee0de39b10ba8e60f4115d65e1251ff29f.zip FreeBSD-src-216166ee0de39b10ba8e60f4115d65e1251ff29f.tar.gz |
Introduce an alias for FILEDESC_{UN}LOCK() with the suffix _FAST.
Use this in all the places where sleeping with the lock held is not
an issue.
The distinction will become significant once we finalize the exact
lock-type to use for this kind of case.
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/svr4/svr4_filio.c | 8 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_misc.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/svr4/svr4_filio.c b/sys/compat/svr4/svr4_filio.c index ef0352d..edf6803 100644 --- a/sys/compat/svr4/svr4_filio.c +++ b/sys/compat/svr4/svr4_filio.c @@ -211,15 +211,15 @@ svr4_fil_ioctl(fp, td, retval, fd, cmd, data) switch (cmd) { case SVR4_FIOCLEX: - FILEDESC_LOCK(fdp); + FILEDESC_LOCK_FAST(fdp); fdp->fd_ofileflags[fd] |= UF_EXCLOSE; - FILEDESC_UNLOCK(fdp); + FILEDESC_UNLOCK_FAST(fdp); return 0; case SVR4_FIONCLEX: - FILEDESC_LOCK(fdp); + FILEDESC_LOCK_FAST(fdp); fdp->fd_ofileflags[fd] &= ~UF_EXCLOSE; - FILEDESC_UNLOCK(fdp); + FILEDESC_UNLOCK_FAST(fdp); return 0; case SVR4_FIOGETOWN: diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 349487b..a093565 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -618,10 +618,10 @@ svr4_sys_fchroot(td, uap) return error; } VREF(vp); - FILEDESC_LOCK(fdp); + FILEDESC_LOCK_FAST(fdp); vpold = fdp->fd_rdir; fdp->fd_rdir = vp; - FILEDESC_UNLOCK(fdp); + FILEDESC_UNLOCK_FAST(fdp); if (vpold != NULL) vrele(vpold); fdrop(fp, td); |