Sat Jan 28 16:43:59 2017 UTC ()
We need to define COMPAT_NETBSD32 before we include other files;
otherwise things like ucontext32_t will be missing.


(christos)
diff -r1.204 -r1.205 src/sys/kern/kern_proc.c

cvs diff -r1.204 -r1.205 src/sys/kern/kern_proc.c (expand / switch to unified diff)

--- src/sys/kern/kern_proc.c 2017/01/27 03:53:01 1.204
+++ src/sys/kern/kern_proc.c 2017/01/28 16:43:59 1.205
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: kern_proc.c,v 1.204 2017/01/27 03:53:01 christos Exp $ */ 1/* $NetBSD: kern_proc.c,v 1.205 2017/01/28 16:43:59 christos Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 * NASA Ames Research Center, and by Andrew Doran. 9 * NASA Ames Research Center, and by Andrew Doran.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -52,35 +52,40 @@ @@ -52,35 +52,40 @@
52 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 52 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
53 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 53 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 54 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
59 * SUCH DAMAGE. 59 * SUCH DAMAGE.
60 * 60 *
61 * @(#)kern_proc.c 8.7 (Berkeley) 2/14/95 61 * @(#)kern_proc.c 8.7 (Berkeley) 2/14/95
62 */ 62 */
63 63
64#include <sys/cdefs.h> 64#include <sys/cdefs.h>
65__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.204 2017/01/27 03:53:01 christos Exp $"); 65__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.205 2017/01/28 16:43:59 christos Exp $");
66 66
67#ifdef _KERNEL_OPT 67#ifdef _KERNEL_OPT
68#include "opt_kstack.h" 68#include "opt_kstack.h"
69#include "opt_maxuprc.h" 69#include "opt_maxuprc.h"
70#include "opt_dtrace.h" 70#include "opt_dtrace.h"
71#include "opt_compat_netbsd32.h" 71#include "opt_compat_netbsd32.h"
72#endif 72#endif
73 73
 74#if defined(__HAVE_COMPAT_NETBSD32) && !defined(COMPAT_NETBSD32) \
 75 && !defined(_RUMPKERNEL)
 76#define COMPAT_NETBSD32
 77#endif
 78
74#include <sys/param.h> 79#include <sys/param.h>
75#include <sys/systm.h> 80#include <sys/systm.h>
76#include <sys/kernel.h> 81#include <sys/kernel.h>
77#include <sys/proc.h> 82#include <sys/proc.h>
78#include <sys/resourcevar.h> 83#include <sys/resourcevar.h>
79#include <sys/buf.h> 84#include <sys/buf.h>
80#include <sys/acct.h> 85#include <sys/acct.h>
81#include <sys/wait.h> 86#include <sys/wait.h>
82#include <sys/file.h> 87#include <sys/file.h>
83#include <ufs/ufs/quota.h> 88#include <ufs/ufs/quota.h>
84#include <sys/uio.h> 89#include <sys/uio.h>
85#include <sys/pool.h> 90#include <sys/pool.h>
86#include <sys/pset.h> 91#include <sys/pset.h>
@@ -94,31 +99,26 @@ __KERNEL_RCSID(0, "$NetBSD: kern_proc.c, @@ -94,31 +99,26 @@ __KERNEL_RCSID(0, "$NetBSD: kern_proc.c,
94#include <sys/kauth.h> 99#include <sys/kauth.h>
95#include <sys/sleepq.h> 100#include <sys/sleepq.h>
96#include <sys/atomic.h> 101#include <sys/atomic.h>
97#include <sys/kmem.h> 102#include <sys/kmem.h>
98#include <sys/namei.h> 103#include <sys/namei.h>
99#include <sys/dtrace_bsd.h> 104#include <sys/dtrace_bsd.h>
100#include <sys/sysctl.h> 105#include <sys/sysctl.h>
101#include <sys/exec.h> 106#include <sys/exec.h>
102#include <sys/cpu.h> 107#include <sys/cpu.h>
103 108
104#include <uvm/uvm_extern.h> 109#include <uvm/uvm_extern.h>
105#include <uvm/uvm.h> 110#include <uvm/uvm.h>
106 111
107#if defined(__HAVE_COMPAT_NETBSD32) && !defined(COMPAT_NETBSD32) \ 
108 && !defined(_RUMPKERNEL) 
109#define COMPAT_NETBSD32 
110#endif 
111 
112#ifdef COMPAT_NETBSD32 112#ifdef COMPAT_NETBSD32
113#include <compat/netbsd32/netbsd32.h> 113#include <compat/netbsd32/netbsd32.h>
114#endif 114#endif
115 115
116/* 116/*
117 * Process lists. 117 * Process lists.
118 */ 118 */
119 119
120struct proclist allproc __cacheline_aligned; 120struct proclist allproc __cacheline_aligned;
121struct proclist zombproc __cacheline_aligned; 121struct proclist zombproc __cacheline_aligned;
122 122
123kmutex_t * proc_lock __cacheline_aligned; 123kmutex_t * proc_lock __cacheline_aligned;
124 124