[Midnightbsd-cvs] src [10023] trunk/sys/fs/procfs: sync

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun May 27 18:15:47 EDT 2018


Revision: 10023
          http://svnweb.midnightbsd.org/src/?rev=10023
Author:   laffer1
Date:     2018-05-27 18:15:46 -0400 (Sun, 27 May 2018)
Log Message:
-----------
sync

Modified Paths:
--------------
    trunk/sys/fs/procfs/procfs.c
    trunk/sys/fs/procfs/procfs.h
    trunk/sys/fs/procfs/procfs_ctl.c
    trunk/sys/fs/procfs/procfs_dbregs.c
    trunk/sys/fs/procfs/procfs_fpregs.c
    trunk/sys/fs/procfs/procfs_ioctl.c
    trunk/sys/fs/procfs/procfs_map.c
    trunk/sys/fs/procfs/procfs_mem.c
    trunk/sys/fs/procfs/procfs_note.c
    trunk/sys/fs/procfs/procfs_osrel.c
    trunk/sys/fs/procfs/procfs_regs.c
    trunk/sys/fs/procfs/procfs_rlimit.c
    trunk/sys/fs/procfs/procfs_status.c
    trunk/sys/fs/procfs/procfs_type.c

Modified: trunk/sys/fs/procfs/procfs.c
===================================================================
--- trunk/sys/fs/procfs/procfs.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,5 +1,6 @@
+/* $MidnightBSD$ */
 /*-
- * Copyright (c) 2001 Dag-Erling Sm\xF8rgrav
+ * Copyright (c) 2001 Dag-Erling Smørgrav
  * Copyright (c) 1993 Jan-Simon Pendry
  * Copyright (c) 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -37,7 +38,7 @@
  *
  *	@(#)procfs_vfsops.c	8.7 (Berkeley) 5/10/95
  *
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/fs/procfs/procfs.c 232278 2012-02-29 00:30:18Z mm $
  */
 
 #include <sys/param.h>

Modified: trunk/sys/fs/procfs/procfs.h
===================================================================
--- trunk/sys/fs/procfs/procfs.h	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs.h	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1993 Jan-Simon Pendry
  * Copyright (c) 1993
@@ -33,7 +34,7 @@
  *	@(#)procfs.h	8.9 (Berkeley) 5/14/95
  *
  * From:
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/fs/procfs/procfs.h 197428 2009-09-23 12:08:08Z kib $
  */
 
 #ifdef _KERNEL

Modified: trunk/sys/fs/procfs/procfs_ctl.c
===================================================================
--- trunk/sys/fs/procfs/procfs_ctl.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs_ctl.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1993 Jan-Simon Pendry
  * Copyright (c) 1993
@@ -33,8 +34,8 @@
  *	@(#)procfs_ctl.c	8.4 (Berkeley) 6/15/94
  *
  * From:
- *	$Id: procfs_ctl.c,v 1.6 2013-01-17 23:29:36 laffer1 Exp $
- * $MidnightBSD$
+ *	$Id: procfs_ctl.c,v 1.51 2003/12/07 17:40:00 des Exp $
+ * $FreeBSD: stable/10/sys/fs/procfs/procfs_ctl.c 287604 2015-09-09 23:39:30Z jhb $
  */
 
 #include <sys/param.h>
@@ -143,8 +144,8 @@
 		p->p_flag |= P_TRACED;
 		faultin(p);
 		p->p_xstat = 0;		/* XXX ? */
+		p->p_oppid = p->p_pptr->p_pid;
 		if (p->p_pptr != td->td_proc) {
-			p->p_oppid = p->p_pptr->p_pid;
 			proc_reparent(p, td->td_proc);
 		}
 		kern_psignal(p, SIGSTOP);
@@ -235,6 +236,7 @@
 		} else
 			PROC_LOCK(p);
 		p->p_oppid = 0;
+		p->p_stops = 0;
 		p->p_flag &= ~P_WAITED;	/* XXX ? */
 		sx_xunlock(&proctree_lock);
 

Modified: trunk/sys/fs/procfs/procfs_dbregs.c
===================================================================
--- trunk/sys/fs/procfs/procfs_dbregs.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs_dbregs.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1999 Brian Scott Dean, brdean at unx.sas.com.
  *                    All rights reserved.
@@ -39,8 +40,8 @@
  *	From: @(#)procfs_regs.c	8.4 (Berkeley) 6/15/94
  *
  * From:
- *	$Id: procfs_dbregs.c,v 1.5 2013-01-17 23:29:36 laffer1 Exp $
- * $MidnightBSD$
+ *	$Id: procfs_regs.c,v 3.2 1993/12/15 09:40:17 jsp Exp $
+ * $FreeBSD: stable/10/sys/fs/procfs/procfs_dbregs.c 217896 2011-01-26 20:03:58Z dchagin $
  */
 
 #include "opt_compat.h"

Modified: trunk/sys/fs/procfs/procfs_fpregs.c
===================================================================
--- trunk/sys/fs/procfs/procfs_fpregs.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs_fpregs.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1993 Jan-Simon Pendry
  * Copyright (c) 1993
@@ -33,8 +34,8 @@
  *	@(#)procfs_fpregs.c	8.2 (Berkeley) 6/15/94
  *
  * From:
- *	$Id: procfs_fpregs.c,v 1.5 2013-01-17 23:29:36 laffer1 Exp $
- * $MidnightBSD$
+ *	$Id: procfs_regs.c,v 3.2 1993/12/15 09:40:17 jsp Exp $
+ * $FreeBSD: stable/10/sys/fs/procfs/procfs_fpregs.c 217896 2011-01-26 20:03:58Z dchagin $
  */
 
 #include "opt_compat.h"

Modified: trunk/sys/fs/procfs/procfs_ioctl.c
===================================================================
--- trunk/sys/fs/procfs/procfs_ioctl.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs_ioctl.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,5 +1,6 @@
+/* $MidnightBSD$ */
 /*-
- * Copyright (c) 2001 Dag-Erling Co\xEFdan Sm\xF8rgrav
+ * Copyright (c) 2001 Dag-Erling Coïdan Smørgrav
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,7 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- *      $MidnightBSD$
+ *      $FreeBSD: stable/10/sys/fs/procfs/procfs_ioctl.c 230132 2012-01-15 13:23:18Z uqs $
  */
 
 #include "opt_compat.h"

Modified: trunk/sys/fs/procfs/procfs_map.c
===================================================================
--- trunk/sys/fs/procfs/procfs_map.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs_map.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1993 Jan-Simon Pendry
  * Copyright (c) 1993
@@ -32,7 +33,7 @@
  *
  *	@(#)procfs_status.c	8.3 (Berkeley) 2/17/94
  *
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/fs/procfs/procfs_map.c 288499 2015-10-02 14:36:41Z vangyzen $
  */
 
 #include "opt_compat.h"
@@ -43,9 +44,9 @@
 #include <sys/filedesc.h>
 #include <sys/malloc.h>
 #include <sys/mount.h>
-#include <sys/mutex.h>
 #include <sys/proc.h>
 #include <sys/resourcevar.h>
+#include <sys/rwlock.h>
 #include <sys/sbuf.h>
 #ifdef COMPAT_FREEBSD32
 #include <sys/sysent.h>
@@ -84,7 +85,7 @@
 	struct vnode *vp;
 	char *fullpath, *freepath;
 	struct ucred *cred;
-	int error, vfslocked;
+	int error;
 	unsigned int last_timestamp;
 #ifdef COMPAT_FREEBSD32
 	int wrap32 = 0;
@@ -132,7 +133,7 @@
 		privateresident = 0;
 		obj = entry->object.vm_object;
 		if (obj != NULL) {
-			VM_OBJECT_LOCK(obj);
+			VM_OBJECT_RLOCK(obj);
 			if (obj->shadow_count == 1)
 				privateresident = obj->resident_page_count;
 		}
@@ -148,9 +149,9 @@
 
 		for (lobj = tobj = obj; tobj; tobj = tobj->backing_object) {
 			if (tobj != obj)
-				VM_OBJECT_LOCK(tobj);
+				VM_OBJECT_RLOCK(tobj);
 			if (lobj != obj)
-				VM_OBJECT_UNLOCK(lobj);
+				VM_OBJECT_RUNLOCK(lobj);
 			lobj = tobj;
 		}
 		last_timestamp = map->timestamp;
@@ -159,11 +160,11 @@
 		freepath = NULL;
 		fullpath = "-";
 		if (lobj) {
+			vp = NULL;
 			switch (lobj->type) {
 			default:
 			case OBJT_DEFAULT:
 				type = "default";
-				vp = NULL;
 				break;
 			case OBJT_VNODE:
 				type = "vnode";
@@ -171,27 +172,31 @@
 				vref(vp);
 				break;
 			case OBJT_SWAP:
-				type = "swap";
-				vp = NULL;
+				if ((lobj->flags & OBJ_TMPFS_NODE) != 0) {
+					type = "vnode";
+					if ((lobj->flags & OBJ_TMPFS) != 0) {
+						vp = lobj->un_pager.swp.swp_tmpfs;
+						vref(vp);
+					}
+				} else {
+					type = "swap";
+				}
 				break;
 			case OBJT_SG:
 			case OBJT_DEVICE:
 				type = "device";
-				vp = NULL;
 				break;
 			}
 			if (lobj != obj)
-				VM_OBJECT_UNLOCK(lobj);
+				VM_OBJECT_RUNLOCK(lobj);
 
 			flags = obj->flags;
 			ref_count = obj->ref_count;
 			shadow_count = obj->shadow_count;
-			VM_OBJECT_UNLOCK(obj);
+			VM_OBJECT_RUNLOCK(obj);
 			if (vp != NULL) {
 				vn_fullpath(td, vp, &fullpath, &freepath);
-				vfslocked = VFS_LOCK_GIANT(vp->v_mount);
 				vrele(vp);
-				VFS_UNLOCK_GIANT(vfslocked);
 			}
 		} else {
 			type = "none";

Modified: trunk/sys/fs/procfs/procfs_mem.c
===================================================================
--- trunk/sys/fs/procfs/procfs_mem.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs_mem.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1993 Jan-Simon Pendry
  * Copyright (c) 1993 Sean Eric Fagan
@@ -33,7 +34,7 @@
  *
  *	@(#)procfs_mem.c	8.5 (Berkeley) 6/15/94
  *
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/fs/procfs/procfs_mem.c 139776 2005-01-06 18:10:42Z imp $
  */
 
 #include <sys/param.h>

Modified: trunk/sys/fs/procfs/procfs_note.c
===================================================================
--- trunk/sys/fs/procfs/procfs_note.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs_note.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1993 Jan-Simon Pendry
  * Copyright (c) 1993
@@ -32,7 +33,7 @@
  *
  *	@(#)procfs_note.c	8.2 (Berkeley) 1/21/94
  *
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/fs/procfs/procfs_note.c 128019 2004-04-07 20:46:16Z imp $
  */
 
 #include <sys/param.h>

Modified: trunk/sys/fs/procfs/procfs_osrel.c
===================================================================
--- trunk/sys/fs/procfs/procfs_osrel.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs_osrel.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2009 Konstantin Belousov
  * All rights reserved.
@@ -28,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/fs/procfs/procfs_osrel.c 197428 2009-09-23 12:08:08Z kib $");
 
 #include <sys/param.h>
 #include <sys/proc.h>

Modified: trunk/sys/fs/procfs/procfs_regs.c
===================================================================
--- trunk/sys/fs/procfs/procfs_regs.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs_regs.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1993 Jan-Simon Pendry
  * Copyright (c) 1993
@@ -33,8 +34,8 @@
  *	@(#)procfs_regs.c	8.4 (Berkeley) 6/15/94
  *
  * From:
- *	$Id: procfs_regs.c,v 1.5 2013-01-17 23:29:36 laffer1 Exp $
- * $MidnightBSD$
+ *	$Id: procfs_regs.c,v 3.2 1993/12/15 09:40:17 jsp Exp $
+ * $FreeBSD: stable/10/sys/fs/procfs/procfs_regs.c 217896 2011-01-26 20:03:58Z dchagin $
  */
 
 #include "opt_compat.h"

Modified: trunk/sys/fs/procfs/procfs_rlimit.c
===================================================================
--- trunk/sys/fs/procfs/procfs_rlimit.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs_rlimit.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1999 Adrian Chadd
  * Copyright (c) 1993
@@ -36,7 +37,7 @@
  *
  *	@(#)procfs_status.c	8.4 (Berkeley) 6/15/94
  *
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/fs/procfs/procfs_rlimit.c 139776 2005-01-06 18:10:42Z imp $
  */
 
 /*

Modified: trunk/sys/fs/procfs/procfs_status.c
===================================================================
--- trunk/sys/fs/procfs/procfs_status.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs_status.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1993 Jan-Simon Pendry
  * Copyright (c) 1993
@@ -33,8 +34,8 @@
  *	@(#)procfs_status.c	8.4 (Berkeley) 6/15/94
  *
  * From:
- *	$Id: procfs_status.c,v 1.5 2013-01-17 23:29:36 laffer1 Exp $
- * $MidnightBSD$
+ *	$Id: procfs_status.c,v 3.1 1993/12/15 09:40:17 jsp Exp $
+ * $FreeBSD: stable/10/sys/fs/procfs/procfs_status.c 293473 2016-01-09 14:08:10Z dchagin $
  */
 
 #include <sys/param.h>
@@ -125,9 +126,9 @@
 	if (p->p_flag & P_INMEM) {
 		struct timeval start, ut, st;
 
-		PROC_SLOCK(p);
+		PROC_STATLOCK(p);
 		calcru(p, &ut, &st);
-		PROC_SUNLOCK(p);
+		PROC_STATUNLOCK(p);
 		start = p->p_stats->p_start;
 		timevaladd(&start, &boottime);
 		sbuf_printf(sb, " %jd,%ld %jd,%ld %jd,%ld",

Modified: trunk/sys/fs/procfs/procfs_type.c
===================================================================
--- trunk/sys/fs/procfs/procfs_type.c	2018-05-27 22:09:13 UTC (rev 10022)
+++ trunk/sys/fs/procfs/procfs_type.c	2018-05-27 22:15:46 UTC (rev 10023)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1993 Jan-Simon Pendry
  * Copyright (c) 1993
@@ -30,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/fs/procfs/procfs_type.c 209062 2010-06-11 19:27:21Z avg $
  */
 
 #include <sys/param.h>



More information about the Midnightbsd-cvs mailing list