From 216166ee0de39b10ba8e60f4115d65e1251ff29f Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 13 Nov 2004 11:53:02 +0000 Subject: 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. --- sys/kern/kern_exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/kern/kern_exec.c') diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index c6d3e5c..92ed024 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -465,16 +465,16 @@ interpret: * For security and other reasons, the file descriptor table cannot * be shared after an exec. */ - FILEDESC_LOCK(p->p_fd); + FILEDESC_LOCK_FAST(p->p_fd); if (p->p_fd->fd_refcnt > 1) { struct filedesc *tmp; - FILEDESC_UNLOCK(p->p_fd); + FILEDESC_UNLOCK_FAST(p->p_fd); tmp = fdcopy(p->p_fd); fdfree(td); p->p_fd = tmp; } else - FILEDESC_UNLOCK(p->p_fd); + FILEDESC_UNLOCK_FAST(p->p_fd); /* * Malloc things before we need locks. -- cgit v1.1