Module Name: src Committed By: rmind Date: Fri Apr 23 21:18:00 UTC 2010
Modified Files: src/sys/kern [rmind-uvmplock]: sysv_shm.c src/sys/uvm [rmind-uvmplock]: uvm_extern.h uvm_object.c Log Message: Use consistent naming - uvm_obj_*(). To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.117.4.1 src/sys/kern/sysv_shm.c cvs rdiff -u -r1.162.2.2 -r1.162.2.3 src/sys/uvm/uvm_extern.h cvs rdiff -u -r1.7.4.1 -r1.7.4.2 src/sys/uvm/uvm_object.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/kern/sysv_shm.c diff -u src/sys/kern/sysv_shm.c:1.117 src/sys/kern/sysv_shm.c:1.117.4.1 --- src/sys/kern/sysv_shm.c:1.117 Mon Oct 5 23:47:04 2009 +++ src/sys/kern/sysv_shm.c Fri Apr 23 21:18:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysv_shm.c,v 1.117 2009/10/05 23:47:04 rmind Exp $ */ +/* $NetBSD: sysv_shm.c,v 1.117.4.1 2010/04/23 21:18:00 rmind Exp $ */ /*- * Copyright (c) 1999, 2007 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysv_shm.c,v 1.117 2009/10/05 23:47:04 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysv_shm.c,v 1.117.4.1 2010/04/23 21:18:00 rmind Exp $"); #define SYSVSHM @@ -268,13 +268,15 @@ if (cmd == SHM_LOCK && (shmseg->shm_perm.mode & SHMSEG_WIRED) == 0) { /* Wire the object and map, then tag it */ - error = uobj_wirepages(shmseg->_shm_internal, 0, size); + error = uvm_obj_wirepages(shmseg->_shm_internal, + 0, size); if (error) return EIO; error = uvm_map_pageable(&p->p_vmspace->vm_map, shmmap_se->va, shmmap_se->va + size, false, 0); if (error) { - uobj_unwirepages(shmseg->_shm_internal, 0, size); + uvm_obj_unwirepages(shmseg->_shm_internal, + 0, size); if (error == EFAULT) error = ENOMEM; return error; @@ -284,7 +286,7 @@ } else if (cmd == SHM_UNLOCK && (shmseg->shm_perm.mode & SHMSEG_WIRED) != 0) { /* Unwire the object and map, then untag it */ - uobj_unwirepages(shmseg->_shm_internal, 0, size); + uvm_obj_unwirepages(shmseg->_shm_internal, 0, size); error = uvm_map_pageable(&p->p_vmspace->vm_map, shmmap_se->va, shmmap_se->va + size, true, 0); if (error) @@ -730,7 +732,7 @@ shmseg->_shm_internal = uao_create(size, 0); if (lockmem) { /* Wire the pages and tag it */ - error = uobj_wirepages(shmseg->_shm_internal, 0, size); + error = uvm_obj_wirepages(shmseg->_shm_internal, 0, size); if (error) { uao_detach(shmseg->_shm_internal); mutex_enter(&shm_lock); Index: src/sys/uvm/uvm_extern.h diff -u src/sys/uvm/uvm_extern.h:1.162.2.2 src/sys/uvm/uvm_extern.h:1.162.2.3 --- src/sys/uvm/uvm_extern.h:1.162.2.2 Thu Mar 18 04:36:54 2010 +++ src/sys/uvm/uvm_extern.h Fri Apr 23 21:18:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_extern.h,v 1.162.2.2 2010/03/18 04:36:54 rmind Exp $ */ +/* $NetBSD: uvm_extern.h,v 1.162.2.3 2010/04/23 21:18:00 rmind Exp $ */ /* * @@ -624,7 +624,7 @@ void uvm_proc_exit(struct proc *); void uvm_lwp_exit(struct lwp *); void uvm_init_limits(struct proc *); -bool uvm_kernacc(void *, vm_prot_t); +bool uvm_kernacc(void *, size_t, vm_prot_t); __dead void uvm_scheduler(void); vaddr_t uvm_uarea_alloc(void); void uvm_uarea_free(vaddr_t); @@ -707,10 +707,8 @@ void uvm_obj_init(struct uvm_object *, const struct uvm_pagerops *, kmutex_t *, u_int); void uvm_obj_destroy(struct uvm_object *, kmutex_t *); -int uobj_wirepages(struct uvm_object *uobj, off_t start, - off_t end); -void uobj_unwirepages(struct uvm_object *uobj, off_t start, - off_t end); +int uvm_obj_wirepages(struct uvm_object *, off_t, off_t); +void uvm_obj_unwirepages(struct uvm_object *, off_t, off_t); /* uvm_page.c */ struct vm_page *uvm_pagealloc_strat(struct uvm_object *, Index: src/sys/uvm/uvm_object.c diff -u src/sys/uvm/uvm_object.c:1.7.4.1 src/sys/uvm/uvm_object.c:1.7.4.2 --- src/sys/uvm/uvm_object.c:1.7.4.1 Tue Mar 16 15:38:18 2010 +++ src/sys/uvm/uvm_object.c Fri Apr 23 21:18:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_object.c,v 1.7.4.1 2010/03/16 15:38:18 rmind Exp $ */ +/* $NetBSD: uvm_object.c,v 1.7.4.2 2010/04/23 21:18:00 rmind Exp $ */ /* * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvm_object.c,v 1.7.4.1 2010/03/16 15:38:18 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_object.c,v 1.7.4.2 2010/04/23 21:18:00 rmind Exp $"); #include "opt_ddb.h" @@ -100,7 +100,7 @@ */ int -uobj_wirepages(struct uvm_object *uobj, off_t start, off_t end) +uvm_obj_wirepages(struct uvm_object *uobj, off_t start, off_t end) { int i, npages, error; struct vm_page *pgs[FETCH_PAGECOUNT], *pg = NULL; @@ -183,7 +183,7 @@ */ void -uobj_unwirepages(struct uvm_object *uobj, off_t start, off_t end) +uvm_obj_unwirepages(struct uvm_object *uobj, off_t start, off_t end) { struct vm_page *pg; off_t offset;