Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/arch/sh3/sh3 Pull up revision 1.17 (requested by ju...



details:   https://anonhg.NetBSD.org/src/rev/f488ae9530c0
branches:  netbsd-1-6
changeset: 530772:f488ae9530c0
user:      tron <tron%NetBSD.org@localhost>
date:      Thu Oct 02 09:51:38 2003 +0000

description:
Pull up revision 1.17 (requested by junyoung in ticket #1488):
count executable image pages as executable for vm-usage purposes.
also, always do the VTEXT vs. v_writecount mutual exclusion
(which we previously skipped if the text or data segment was empty).

diffstat:

 sys/arch/sh3/sh3/coff_exec.c |  19 ++++---------------
 1 files changed, 4 insertions(+), 15 deletions(-)

diffs (33 lines):

diff -r 70a6e9f279b8 -r f488ae9530c0 sys/arch/sh3/sh3/coff_exec.c
--- a/sys/arch/sh3/sh3/coff_exec.c      Thu Oct 02 09:51:33 2003 +0000
+++ b/sys/arch/sh3/sh3/coff_exec.c      Thu Oct 02 09:51:38 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: coff_exec.c,v 1.15.4.1 2003/09/27 15:52:37 tron Exp $  */
+/*     $NetBSD: coff_exec.c,v 1.15.4.2 2003/10/02 09:51:38 tron Exp $  */
 
 /*
  * Copyright (c) 1994, 1995 Scott Bartram
@@ -299,20 +299,9 @@
        offset = sh.s_scnptr - (sh.s_vaddr - epp->ep_taddr);
        epp->ep_tsize = sh.s_size + (sh.s_vaddr - epp->ep_taddr);
 
-       /*
-        * check if vnode is in open for writing, because we want to
-        * demand-page out of it.  if it is, don't do it, for various
-        * reasons
-        */
-       if ((ap->a_tsize != 0 || ap->a_dsize != 0) &&
-           epp->ep_vp->v_writecount != 0) {
-#ifdef DIAGNOSTIC
-               if (epp->ep_vp->v_flag & VTEXT)
-                       panic("exec: a VTEXT vnode has writecount != 0");
-#endif
-               return ETXTBSY;
-       }
-       epp->ep_vp->v_flag |= VTEXT;
+       error = vn_marktext(epp->ep_vp);
+       if (error)
+               return (error);
 
        DPRINTF(("VMCMD: addr %lx size %lx offset %lx\n", epp->ep_taddr,
            epp->ep_tsize, offset));



Home | Main Index | Thread Index | Old Index