Using an atomic operation here won't help if nobody else uses them (for

this).  Use the simple_lock() on v_interlock like elsewhere.
This commit is contained in:
Brian Feldman 2000-07-23 22:19:49 +00:00
parent a5061fba1f
commit 55af4c7d94
1 changed files with 3 additions and 2 deletions

View File

@ -61,7 +61,6 @@
#include <vm/vm_object.h>
#include <vm/vm_extern.h>
#include <machine/atomic.h>
#include <machine/elf.h>
#include <machine/md_var.h>
@ -478,7 +477,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.
*/
atomic_set_long(&imgp->vp->v_flag, VTEXT);
simple_lock(&imgp->vp->v_interlock);
imgp->vp->v_flag |= VTEXT;
simple_unlock(&imgp->vp->v_interlock);
if ((error = exec_extract_strings(imgp)) != 0)
goto fail;