diff options
Diffstat (limited to 'sys/kern/kern_rwlock.c')
-rw-r--r-- | sys/kern/kern_rwlock.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c index 1037f34..a4d3e96 100644 --- a/sys/kern/kern_rwlock.c +++ b/sys/kern/kern_rwlock.c @@ -67,12 +67,12 @@ SYSCTL_INT(_debug_rwlock, OID_AUTO, loops, CTLFLAG_RW, &rowner_loops, 0, ""); #ifdef DDB #include <ddb/ddb.h> -static void db_show_rwlock(struct lock_object *lock); +static void db_show_rwlock(const struct lock_object *lock); #endif -static void assert_rw(struct lock_object *lock, int what); +static void assert_rw(const struct lock_object *lock, int what); static void lock_rw(struct lock_object *lock, int how); #ifdef KDTRACE_HOOKS -static int owner_rw(struct lock_object *lock, struct thread **owner); +static int owner_rw(const struct lock_object *lock, struct thread **owner); #endif static int unlock_rw(struct lock_object *lock); @@ -121,10 +121,10 @@ struct lock_class lock_class_rw = { #endif void -assert_rw(struct lock_object *lock, int what) +assert_rw(const struct lock_object *lock, int what) { - rw_assert((struct rwlock *)lock, what); + rw_assert((const struct rwlock *)lock, what); } void @@ -157,9 +157,9 @@ unlock_rw(struct lock_object *lock) #ifdef KDTRACE_HOOKS int -owner_rw(struct lock_object *lock, struct thread **owner) +owner_rw(const struct lock_object *lock, struct thread **owner) { - struct rwlock *rw = (struct rwlock *)lock; + const struct rwlock *rw = (const struct rwlock *)lock; uintptr_t x = rw->rw_lock; *owner = rw_wowner(rw); @@ -223,7 +223,7 @@ rw_sysinit_flags(void *arg) } int -rw_wowned(struct rwlock *rw) +rw_wowned(const struct rwlock *rw) { return (rw_wowner(rw) == curthread); @@ -1011,7 +1011,7 @@ out: * thread owns an rlock. */ void -_rw_assert(struct rwlock *rw, int what, const char *file, int line) +_rw_assert(const struct rwlock *rw, int what, const char *file, int line) { if (panicstr != NULL) @@ -1084,12 +1084,12 @@ _rw_assert(struct rwlock *rw, int what, const char *file, int line) #ifdef DDB void -db_show_rwlock(struct lock_object *lock) +db_show_rwlock(const struct lock_object *lock) { - struct rwlock *rw; + const struct rwlock *rw; struct thread *td; - rw = (struct rwlock *)lock; + rw = (const struct rwlock *)lock; db_printf(" state: "); if (rw->rw_lock == RW_UNLOCKED) |