/* $NetBSD: mem.c,v 1.31 1996/05/03 19:42:19 christos Exp $ */
-/* $OpenBSD: mem.c,v 1.49 2016/08/15 22:01:59 tedu Exp $ */
+/* $OpenBSD: mem.c,v 1.50 2016/08/16 18:19:15 tedu Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
int
mmrw(dev_t dev, struct uio *uio, int flags)
{
+ static struct rwlock physlock = RWLOCK_INITIALIZER("mmrw");
vaddr_t o, v;
size_t c;
struct iovec *iov;
int error = 0;
- static struct rwlock physlock = RWLOCK_INITIALIZER("mmrw");
if (minor(dev) == 0) {
/* lock against other uses of shared vmmap */