diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-15 06:22:31 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-15 06:22:31 +0000 |
commit | ce070c7054f4f778763aa8d668f1f92ae896ed05 (patch) | |
tree | 7ab7f3ae0de51dededd5a4bc865ded5cb72182ad /sys/kern | |
parent | 19713aecd94bdccec26003f193cc82be3dd363c0 (diff) |
New function vn_marktext - mark a vnode as executing a text image.
Use where VTEXT was set in vnode flags before. Doesn't do anything else (yet).
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/exec_aout.c | 4 | ||||
-rw-r--r-- | sys/kern/exec_ecoff.c | 4 | ||||
-rw-r--r-- | sys/kern/exec_elf.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_vnops.c | 12 |
4 files changed, 17 insertions, 7 deletions
diff --git a/sys/kern/exec_aout.c b/sys/kern/exec_aout.c index 202ee8f3af8..1ef6f5b3d62 100644 --- a/sys/kern/exec_aout.c +++ b/sys/kern/exec_aout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_aout.c,v 1.6 2001/11/06 19:53:20 miod Exp $ */ +/* $OpenBSD: exec_aout.c,v 1.7 2001/11/15 06:22:30 art Exp $ */ /* $NetBSD: exec_aout.c,v 1.14 1996/02/04 02:15:01 christos Exp $ */ /* @@ -129,7 +129,7 @@ exec_aout_prep_zmagic(p, epp) #endif return ETXTBSY; } - epp->ep_vp->v_flag |= VTEXT; + vn_marktext(epp->ep_vp); /* set up command for text segment */ NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_pagedvn, execp->a_text, diff --git a/sys/kern/exec_ecoff.c b/sys/kern/exec_ecoff.c index 5e0d343adff..d7f7dac6115 100644 --- a/sys/kern/exec_ecoff.c +++ b/sys/kern/exec_ecoff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_ecoff.c,v 1.8 2001/11/06 19:53:20 miod Exp $ */ +/* $OpenBSD: exec_ecoff.c,v 1.9 2001/11/15 06:22:30 art Exp $ */ /* $NetBSD: exec_ecoff.c,v 1.8 1996/05/19 20:36:06 jonathan Exp $ */ /* @@ -198,7 +198,7 @@ exec_ecoff_prep_zmagic(p, epp) #endif return ETXTBSY; } - epp->ep_vp->v_flag |= VTEXT; + vn_marktext(epp->ep_vp); /* set up command for text segment */ NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_pagedvn, eap->tsize, diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index 889b150ce29..2ef35faab22 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.36 2001/11/06 19:53:20 miod Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.37 2001/11/15 06:22:30 art Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -636,7 +636,7 @@ native: #endif free((char *)ph, M_TEMP); - epp->ep_vp->v_flag |= VTEXT; + vn_marktext(epp->ep_vp); return (exec_setup_stack(p, epp)); bad: diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index a6a4971a36b..ee5eb0baee2 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vnops.c,v 1.34 2001/11/06 19:53:20 miod Exp $ */ +/* $OpenBSD: vfs_vnops.c,v 1.35 2001/11/15 06:22:30 art Exp $ */ /* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */ /* @@ -208,6 +208,16 @@ vn_writechk(vp) } /* + * Mark a vnode as being the text image of a running process. + */ +void +vn_marktext(vp) + struct vnode *vp; +{ + vp->v_flag |= VTEXT; +} + +/* * Vnode close call */ int |