Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Add uvm_lwp_getuarea() and uvm_lwp_setuarea(). OK m...
details: https://anonhg.NetBSD.org/src/rev/d2e41cfa0249
branches: trunk
changeset: 749214:d2e41cfa0249
user: rmind <rmind%NetBSD.org@localhost>
date: Sat Nov 21 17:45:02 2009 +0000
description:
Add uvm_lwp_getuarea() and uvm_lwp_setuarea(). OK matt@.
diffstat:
sys/uvm/uvm_extern.h | 4 +++-
sys/uvm/uvm_glue.c | 18 ++++++++++++++++--
2 files changed, 19 insertions(+), 3 deletions(-)
diffs (57 lines):
diff -r 15e3a9d03234 -r d2e41cfa0249 sys/uvm/uvm_extern.h
--- a/sys/uvm/uvm_extern.h Sat Nov 21 17:40:27 2009 +0000
+++ b/sys/uvm/uvm_extern.h Sat Nov 21 17:45:02 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_extern.h,v 1.160 2009/10/21 21:12:07 rmind Exp $ */
+/* $NetBSD: uvm_extern.h,v 1.161 2009/11/21 17:45:02 rmind Exp $ */
/*
*
@@ -629,6 +629,8 @@
__dead void uvm_scheduler(void);
vaddr_t uvm_uarea_alloc(void);
void uvm_uarea_free(vaddr_t);
+vaddr_t uvm_lwp_getuarea(lwp_t *);
+void uvm_lwp_setuarea(lwp_t *, vaddr_t);
int uvm_vslock(struct vmspace *, void *, size_t, vm_prot_t);
void uvm_vsunlock(struct vmspace *, void *, size_t);
void uvm_cpu_attach(struct cpu_info *);
diff -r 15e3a9d03234 -r d2e41cfa0249 sys/uvm/uvm_glue.c
--- a/sys/uvm/uvm_glue.c Sat Nov 21 17:40:27 2009 +0000
+++ b/sys/uvm/uvm_glue.c Sat Nov 21 17:45:02 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_glue.c,v 1.141 2009/10/21 21:12:07 rmind Exp $ */
+/* $NetBSD: uvm_glue.c,v 1.142 2009/11/21 17:45:02 rmind Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.141 2009/10/21 21:12:07 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.142 2009/11/21 17:45:02 rmind Exp $");
#include "opt_kgdb.h"
#include "opt_kstack.h"
@@ -331,6 +331,20 @@
pool_cache_put(uvm_uarea_cache, (void *)uaddr);
}
+vaddr_t
+uvm_lwp_getuarea(lwp_t *l)
+{
+
+ return USER_TO_UAREA(l->l_addr);
+}
+
+void
+uvm_lwp_setuarea(lwp_t *l, vaddr_t addr)
+{
+
+ l->l_addr = UAREA_TO_USER(addr);
+}
+
/*
* uvm_proc_exit: exit a virtual address space
*
Home |
Main Index |
Thread Index |
Old Index