Wed Jul 27 13:20:07 2011 UTC ()
Forward-declare struct vmspace to reduce dependencies on uvm/uvm_extern.h.


(uebayasi)
diff -r1.307 -r1.308 src/sys/sys/proc.h
diff -r1.35 -r1.36 src/sys/sys/uio.h

cvs diff -r1.307 -r1.308 src/sys/sys/proc.h (expand / switch to unified diff)

--- src/sys/sys/proc.h 2011/05/02 22:27:53 1.307
+++ src/sys/sys/proc.h 2011/07/27 13:20:07 1.308
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: proc.h,v 1.307 2011/05/02 22:27:53 rmind Exp $ */ 1/* $NetBSD: proc.h,v 1.308 2011/07/27 13:20:07 uebayasi Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 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 Andrew Doran. 8 * by Andrew Doran.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -194,26 +194,28 @@ struct emul { @@ -194,26 +194,28 @@ struct emul {
194 * which might be addressible only on a processor on which the process 194 * which might be addressible only on a processor on which the process
195 * is running. 195 * is running.
196 * 196 *
197 * Field markings and the corresponding locks: 197 * Field markings and the corresponding locks:
198 * 198 *
199 * a: p_auxlock 199 * a: p_auxlock
200 * k: ktrace_mutex 200 * k: ktrace_mutex
201 * l: proc_lock 201 * l: proc_lock
202 * t: p_stmutex 202 * t: p_stmutex
203 * p: p_lock 203 * p: p_lock
204 * (: updated atomically 204 * (: updated atomically
205 * :: unlocked, stable 205 * :: unlocked, stable
206 */ 206 */
 207struct vmspace;
 208
207struct proc { 209struct proc {
208 LIST_ENTRY(proc) p_list; /* l: List of all processes */ 210 LIST_ENTRY(proc) p_list; /* l: List of all processes */
209 211
210 kmutex_t p_auxlock; /* :: secondary, longer term lock */ 212 kmutex_t p_auxlock; /* :: secondary, longer term lock */
211 kmutex_t *p_lock; /* :: general mutex */ 213 kmutex_t *p_lock; /* :: general mutex */
212 kmutex_t p_stmutex; /* :: mutex on profiling state */ 214 kmutex_t p_stmutex; /* :: mutex on profiling state */
213 krwlock_t p_reflock; /* p: lock for debugger, procfs */ 215 krwlock_t p_reflock; /* p: lock for debugger, procfs */
214 kcondvar_t p_waitcv; /* p: wait, stop CV on children */ 216 kcondvar_t p_waitcv; /* p: wait, stop CV on children */
215 kcondvar_t p_lwpcv; /* p: wait, stop CV on LWPs */ 217 kcondvar_t p_lwpcv; /* p: wait, stop CV on LWPs */
216  218
217 /* Substructures: */ 219 /* Substructures: */
218 struct kauth_cred *p_cred; /* p: Master copy of credentials */ 220 struct kauth_cred *p_cred; /* p: Master copy of credentials */
219 struct filedesc *p_fd; /* :: Ptr to open files structure */ 221 struct filedesc *p_fd; /* :: Ptr to open files structure */

cvs diff -r1.35 -r1.36 src/sys/sys/uio.h (expand / switch to unified diff)

--- src/sys/sys/uio.h 2010/04/23 15:19:20 1.35
+++ src/sys/sys/uio.h 2011/07/27 13:20:07 1.36
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: uio.h,v 1.35 2010/04/23 15:19:20 rmind Exp $ */ 1/* $NetBSD: uio.h,v 1.36 2011/07/27 13:20:07 uebayasi Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1982, 1986, 1993, 1994 4 * Copyright (c) 1982, 1986, 1993, 1994
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -66,26 +66,28 @@ typedef __off_t off_t; /* file offset * @@ -66,26 +66,28 @@ typedef __off_t off_t; /* file offset *
66#define off_t __off_t 66#define off_t __off_t
67#endif 67#endif
68 68
69enum uio_rw { UIO_READ, UIO_WRITE }; 69enum uio_rw { UIO_READ, UIO_WRITE };
70 70
71/* Segment flag values. */ 71/* Segment flag values. */
72enum uio_seg { 72enum uio_seg {
73 UIO_USERSPACE, /* from user data space */ 73 UIO_USERSPACE, /* from user data space */
74 UIO_SYSSPACE /* from system space */ 74 UIO_SYSSPACE /* from system space */
75}; 75};
76 76
77#ifdef __UIO_EXPOSE 77#ifdef __UIO_EXPOSE
78 78
 79struct vmspace;
 80
79struct uio { 81struct uio {
80 struct iovec *uio_iov; /* pointer to array of iovecs */ 82 struct iovec *uio_iov; /* pointer to array of iovecs */
81 int uio_iovcnt; /* number of iovecs in array */ 83 int uio_iovcnt; /* number of iovecs in array */
82 off_t uio_offset; /* offset into file this uio corresponds to */ 84 off_t uio_offset; /* offset into file this uio corresponds to */
83 size_t uio_resid; /* residual i/o count */ 85 size_t uio_resid; /* residual i/o count */
84 enum uio_rw uio_rw; /* see above */ 86 enum uio_rw uio_rw; /* see above */
85 struct vmspace *uio_vmspace; 87 struct vmspace *uio_vmspace;
86}; 88};
87#define UIO_SETUP_SYSSPACE(uio) uio_setup_sysspace(uio) 89#define UIO_SETUP_SYSSPACE(uio) uio_setup_sysspace(uio)
88 90
89#endif /* __UIO_EXPOSE */ 91#endif /* __UIO_EXPOSE */
90 92
91/* 93/*