diff options
author | jasone <jasone@FreeBSD.org> | 2000-10-04 01:29:17 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2000-10-04 01:29:17 +0000 |
commit | 4e290e67b7310d906f113850fddfdf1017a9d15b (patch) | |
tree | bae3e99c848c6e38aee34a7cf61ffa9ca55b0095 /sys/kern/imgact_elf.c | |
parent | bea51a4aa1bf67a183bd1d4a6227fa891345af60 (diff) | |
download | FreeBSD-src-4e290e67b7310d906f113850fddfdf1017a9d15b.zip FreeBSD-src-4e290e67b7310d906f113850fddfdf1017a9d15b.tar.gz |
Convert lockmgr locks from using simple locks to using mutexes.
Add lockdestroy() and appropriate invocations, which corresponds to
lockinit() and must be called to clean up after a lockmgr lock is no
longer needed.
Diffstat (limited to 'sys/kern/imgact_elf.c')
-rw-r--r-- | sys/kern/imgact_elf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index dac862a..2123b11 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -63,6 +63,7 @@ #include <machine/elf.h> #include <machine/md_var.h> +#include <machine/mutex.h> #define OLD_EI_BRAND 8 @@ -477,9 +478,9 @@ exec_elf_imgact(struct image_params *imgp) * a context switch. Better safe than sorry; I really don't want * the file to change while it's being loaded. */ - simple_lock(&imgp->vp->v_interlock); + mtx_enter(&imgp->vp->v_interlock, MTX_DEF); imgp->vp->v_flag |= VTEXT; - simple_unlock(&imgp->vp->v_interlock); + mtx_exit(&imgp->vp->v_interlock, MTX_DEF); if ((error = exec_extract_strings(imgp)) != 0) goto fail; |