Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/compat/ibcs2 Pull up revision 1.5 (requested by jun...



details:   https://anonhg.NetBSD.org/src/rev/f3977ac8e7e4
branches:  netbsd-1-6
changeset: 530778:f3977ac8e7e4
user:      tron <tron%NetBSD.org@localhost>
date:      Thu Oct 02 09:52:22 2003 +0000

description:
Pull up revision 1.5 (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/compat/ibcs2/ibcs2_exec_coff.c |  25 ++++++-------------------
 1 files changed, 6 insertions(+), 19 deletions(-)

diffs (49 lines):

diff -r a1a2c024d928 -r f3977ac8e7e4 sys/compat/ibcs2/ibcs2_exec_coff.c
--- a/sys/compat/ibcs2/ibcs2_exec_coff.c        Thu Oct 02 09:52:16 2003 +0000
+++ b/sys/compat/ibcs2/ibcs2_exec_coff.c        Thu Oct 02 09:52:22 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ibcs2_exec_coff.c,v 1.3.10.1 2003/09/27 15:52:55 tron Exp $    */
+/*     $NetBSD: ibcs2_exec_coff.c,v 1.3.10.2 2003/10/02 09:52:22 tron Exp $    */
 
 /*
  * Copyright (c) 1994, 1995, 1998 Scott Bartram
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_coff.c,v 1.3.10.1 2003/09/27 15:52:55 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_coff.c,v 1.3.10.2 2003/10/02 09:52:22 tron Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -440,26 +440,13 @@
        offset = sh.s_scnptr - (sh.s_vaddr - epp->ep_taddr);
        epp->ep_tsize = sh.s_size + (sh.s_vaddr - epp->ep_taddr);
 
-#ifdef notyet
-       /*
-        * 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
-n       */
-       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;
-#endif
-       
        /* DPRINTF(("VMCMD: addr %x size %d offset %d\n", epp->ep_taddr,
                 epp->ep_tsize, offset)); */
 #ifdef notyet
+       error = vn_marktext(epp->ep_vp);
+       if (error)
+               return (error);
+       
        NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_pagedvn, epp->ep_tsize,
                  epp->ep_taddr, epp->ep_vp, offset,
                  VM_PROT_READ|VM_PROT_EXECUTE);



Home | Main Index | Thread Index | Old Index