Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/kern Pull up revision 1.55 (requested by junyoung i...
details: https://anonhg.NetBSD.org/src/rev/6f64f733c436
branches: netbsd-1-6
changeset: 530774:6f64f733c436
user: tron <tron%NetBSD.org@localhost>
date: Thu Oct 02 09:51:51 2003 +0000
description:
Pull up revision 1.55 (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/kern/vfs_vnops.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r 0ce965dbbe1b -r 6f64f733c436 sys/kern/vfs_vnops.c
--- a/sys/kern/vfs_vnops.c Thu Oct 02 09:51:45 2003 +0000
+++ b/sys/kern/vfs_vnops.c Thu Oct 02 09:51:51 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_vnops.c,v 1.54 2002/03/17 19:41:08 atatat Exp $ */
+/* $NetBSD: vfs_vnops.c,v 1.54.6.1 2003/10/02 09:51:51 tron Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.54 2002/03/17 19:41:08 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.54.6.1 2003/10/02 09:51:51 tron Exp $");
#include "fs_union.h"
@@ -210,6 +210,24 @@
}
/*
+ * Mark a vnode as being the text of a process.
+ * Fail if the vnode is currently writable.
+ */
+int
+vn_marktext(vp)
+ struct vnode *vp;
+{
+
+ if (vp->v_writecount != 0) {
+ KASSERT((vp->v_flag & VTEXT) == 0);
+ return (ETXTBSY);
+ }
+ vp->v_flag |= VTEXT;
+ vn_markexec(vp);
+ return (0);
+}
+
+/*
* Vnode close call
*
* Note: takes an unlocked vnode, while VOP_CLOSE takes a locked node.
Home |
Main Index |
Thread Index |
Old Index