Module Name: src Committed By: rmind Date: Sat Nov 21 17:45:02 UTC 2009
Modified Files: src/sys/uvm: uvm_extern.h uvm_glue.c Log Message: Add uvm_lwp_getuarea() and uvm_lwp_setuarea(). OK m...@. To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/sys/uvm/uvm_extern.h cvs rdiff -u -r1.141 -r1.142 src/sys/uvm/uvm_glue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_extern.h diff -u src/sys/uvm/uvm_extern.h:1.160 src/sys/uvm/uvm_extern.h:1.161 --- src/sys/uvm/uvm_extern.h:1.160 Wed Oct 21 21:12:07 2009 +++ src/sys/uvm/uvm_extern.h Sat Nov 21 17:45:02 2009 @@ -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 *); Index: src/sys/uvm/uvm_glue.c diff -u src/sys/uvm/uvm_glue.c:1.141 src/sys/uvm/uvm_glue.c:1.142 --- src/sys/uvm/uvm_glue.c:1.141 Wed Oct 21 21:12:07 2009 +++ src/sys/uvm/uvm_glue.c Sat Nov 21 17:45:02 2009 @@ -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 *