summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_descrip.c4
-rw-r--r--sys/kern/kern_rwlock.c7
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index b4cadf9cbae..e41013a29b0 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_descrip.c,v 1.73 2006/01/06 18:28:33 jmc Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.74 2006/05/07 20:12:41 tedu Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
@@ -847,7 +847,7 @@ fdinit(struct proc *p)
if (newfdp->fd_fd.fd_rdir)
VREF(newfdp->fd_fd.fd_rdir);
}
- rw_init(&newfdp->fd_fd.fd_lock);
+ rw_init(&newfdp->fd_fd.fd_lock, "fdlock");
/* Create the file descriptor table. */
newfdp->fd_fd.fd_refcnt = 1;
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c
index 1a648aa831b..4c750a2f2f6 100644
--- a/sys/kern/kern_rwlock.c
+++ b/sys/kern/kern_rwlock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_rwlock.c,v 1.6 2006/04/20 14:36:24 pedro Exp $ */
+/* $OpenBSD: kern_rwlock.c,v 1.7 2006/05/07 20:12:41 tedu Exp $ */
/*
* Copyright (c) 2002, 2003 Artur Grabowski <art@openbsd.org>
@@ -198,9 +198,10 @@ rw_exit_diag(struct rwlock *rwl, int owner)
#endif
void
-rw_init(struct rwlock *rwl)
+rw_init(struct rwlock *rwl, const char *name)
{
rwl->rwl_owner = 0;
+ rwl->rwl_name = name;
}
/*
@@ -230,7 +231,7 @@ retry:
rw_enter_diag(rwl, flags);
- if ((error = tsleep(rwl, prio, "rwlock", 0)) != 0)
+ if ((error = tsleep(rwl, prio, rwl->rwl_name, 0)) != 0)
return (error);
if (flags & RW_SLEEPFAIL)
return (EAGAIN);