Source-Changes-HG archive

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

[src/yamt-uio_vmspace]: src/sys make UIO_SETUP_SYSSPACE a function to avoid h...



details:   https://anonhg.NetBSD.org/src/rev/5e9f8498ee9f
branches:  yamt-uio_vmspace
changeset: 586727:5e9f8498ee9f
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sat Feb 18 13:34:21 2006 +0000

description:
make UIO_SETUP_SYSSPACE a function to avoid header dependency messes.

diffstat:

 sys/kern/kern_subr.c |  11 +++++++++--
 sys/sys/uio.h        |   6 ++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diffs (59 lines):

diff -r 4ae198e40505 -r 5e9f8498ee9f sys/kern/kern_subr.c
--- a/sys/kern/kern_subr.c      Sat Feb 18 13:17:05 2006 +0000
+++ b/sys/kern/kern_subr.c      Sat Feb 18 13:34:21 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_subr.c,v 1.123.2.5 2006/01/15 10:44:52 yamt Exp $ */
+/*     $NetBSD: kern_subr.c,v 1.123.2.6 2006/02/18 13:34:21 yamt Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc.
@@ -86,7 +86,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.123.2.5 2006/01/15 10:44:52 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.123.2.6 2006/02/18 13:34:21 yamt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_md.h"
@@ -131,6 +131,13 @@
 
 MALLOC_DEFINE(M_IOV, "iov", "large iov's");
 
+void
+uio_setup_sysspace(struct uio *uio)
+{
+
+       uio->uio_vmspace = vmspace_kernel();
+}
+
 int
 uiomove(void *buf, size_t n, struct uio *uio)
 {
diff -r 4ae198e40505 -r 5e9f8498ee9f sys/sys/uio.h
--- a/sys/sys/uio.h     Sat Feb 18 13:17:05 2006 +0000
+++ b/sys/sys/uio.h     Sat Feb 18 13:34:21 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uio.h,v 1.33.2.2 2006/02/05 12:23:56 yamt Exp $        */
+/*     $NetBSD: uio.h,v 1.33.2.3 2006/02/18 13:34:21 yamt Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1993, 1994
@@ -84,7 +84,7 @@
        enum    uio_rw uio_rw;  /* see above */
        struct  vmspace *uio_vmspace;
 };
-#define        UIO_SETUP_SYSSPACE(uio) (uio)->uio_vmspace = vmspace_kernel()
+#define        UIO_SETUP_SYSSPACE(uio) uio_setup_sysspace(uio)
 
 #endif /* __UIO_EXPOSE */
 
@@ -101,6 +101,8 @@
 MALLOC_DECLARE(M_IOV);
 
 #define UIO_SMALLIOV   8               /* 8 on stack, else malloc */
+
+void uio_setup_sysspace(struct uio *);
 #endif
 
 #ifndef        _KERNEL



Home | Main Index | Thread Index | Old Index