summaryrefslogtreecommitdiffstats
path: root/sys/dev/streams
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-11-13 11:53:02 +0000
committerphk <phk@FreeBSD.org>2004-11-13 11:53:02 +0000
commit216166ee0de39b10ba8e60f4115d65e1251ff29f (patch)
tree15f70d195895ba0b6c385bc2892b07302db4faaa /sys/dev/streams
parent32d92d3a1a6bf10d16cd48469ec464510bd8ff2f (diff)
downloadFreeBSD-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/dev/streams')
-rw-r--r--sys/dev/streams/streams.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c
index 1df0952..28a77c8 100644
--- a/sys/dev/streams/streams.c
+++ b/sys/dev/streams/streams.c
@@ -256,26 +256,26 @@ streamsopen(struct cdev *dev, int oflags, int devtype, struct thread *td)
if ((error = socreate(family, &so, type, protocol,
td->td_ucred, td)) != 0) {
- FILEDESC_LOCK(p->p_fd);
+ FILEDESC_LOCK_FAST(p->p_fd);
/* Check the fd table entry hasn't changed since we made it. */
extraref = 0;
if (p->p_fd->fd_ofiles[fd] == fp) {
p->p_fd->fd_ofiles[fd] = NULL;
extraref = 1;
}
- FILEDESC_UNLOCK(p->p_fd);
+ FILEDESC_UNLOCK_FAST(p->p_fd);
if (extraref)
fdrop(fp, td);
fdrop(fp, td);
return error;
}
- FILEDESC_LOCK(p->p_fd);
+ FILEDESC_LOCK_FAST(p->p_fd);
fp->f_data = so;
fp->f_flag = FREAD|FWRITE;
fp->f_ops = &svr4_netops;
fp->f_type = DTYPE_SOCKET;
- FILEDESC_UNLOCK(p->p_fd);
+ FILEDESC_UNLOCK_FAST(p->p_fd);
(void)svr4_stream_get(fp);
fdrop(fp, td);
OpenPOWER on IntegriCloud