diff options
-rw-r--r-- | sys/amd64/amd64/pmap.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_mutex.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_rmlock.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_rwlock.c | 6 | ||||
-rw-r--r-- | sys/kern/subr_turnstile.c | 2 | ||||
-rw-r--r-- | sys/sys/turnstile.h | 6 |
6 files changed, 8 insertions, 12 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 413578603c3e..c6bf923e85de 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -513,7 +513,7 @@ pmap_delayed_invl_finished(void) pmap_invl_gen = invl_gen->gen; if (ts != NULL) { turnstile_broadcast(ts, TS_SHARED_QUEUE); - turnstile_unpend(ts, TS_SHARED_LOCK); + turnstile_unpend(ts); } turnstile_chain_unlock(&invl_gen_ts); } else { diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 228840bec082..c3f566dd0279 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -1029,7 +1029,7 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintptr_t v) * This turnstile is now no longer associated with the mutex. We can * unlock the chain lock so a new turnstile may take it's place. */ - turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); + turnstile_unpend(ts); turnstile_chain_unlock(&m->lock_object); } diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c index a82646095420..80f54006b693 100644 --- a/sys/kern/kern_rmlock.c +++ b/sys/kern/kern_rmlock.c @@ -494,7 +494,7 @@ _rm_unlock_hard(struct thread *td,struct rm_priotracker *tracker) ts = turnstile_lookup(&rm->lock_object); turnstile_signal(ts, TS_EXCLUSIVE_QUEUE); - turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); + turnstile_unpend(ts); turnstile_chain_unlock(&rm->lock_object); } else mtx_unlock_spin(&rm_spinlock); diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c index e9a02bdb86a1..9ec967b94192 100644 --- a/sys/kern/kern_rwlock.c +++ b/sys/kern/kern_rwlock.c @@ -822,7 +822,7 @@ __rw_runlock_hard(struct rwlock *rw, struct thread *td, uintptr_t v ts = turnstile_lookup(&rw->lock_object); MPASS(ts != NULL); turnstile_broadcast(ts, queue); - turnstile_unpend(ts, TS_SHARED_LOCK); + turnstile_unpend(ts); td->td_rw_rlocks--; break; } @@ -1259,7 +1259,7 @@ __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t v LOCK_FILE_LINE_ARG_DEF) ts = turnstile_lookup(&rw->lock_object); MPASS(ts != NULL); turnstile_broadcast(ts, queue); - turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); + turnstile_unpend(ts); turnstile_chain_unlock(&rw->lock_object); } @@ -1405,7 +1405,7 @@ __rw_downgrade_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF) */ if (rwait && !wwait) { turnstile_broadcast(ts, TS_SHARED_QUEUE); - turnstile_unpend(ts, TS_EXCLUSIVE_LOCK); + turnstile_unpend(ts); } else turnstile_disown(ts); turnstile_chain_unlock(&rw->lock_object); diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 98ef54e9804d..e4ff9a7f7b1b 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -903,7 +903,7 @@ turnstile_broadcast(struct turnstile *ts, int queue) * chain locked. */ void -turnstile_unpend(struct turnstile *ts, int owner_type) +turnstile_unpend(struct turnstile *ts) { TAILQ_HEAD( ,thread) pending_threads; struct turnstile *nts; diff --git a/sys/sys/turnstile.h b/sys/sys/turnstile.h index 3843bbd54232..b2a14eaf0aa9 100644 --- a/sys/sys/turnstile.h +++ b/sys/sys/turnstile.h @@ -83,10 +83,6 @@ struct turnstile; #define TS_EXCLUSIVE_QUEUE 0 #define TS_SHARED_QUEUE 1 -/* The type of lock currently held. */ -#define TS_EXCLUSIVE_LOCK TS_EXCLUSIVE_QUEUE -#define TS_SHARED_LOCK TS_SHARED_QUEUE - void init_turnstiles(void); void turnstile_adjust(struct thread *, u_char); struct turnstile *turnstile_alloc(void); @@ -102,7 +98,7 @@ struct thread *turnstile_head(struct turnstile *, int); struct turnstile *turnstile_lookup(struct lock_object *); int turnstile_signal(struct turnstile *, int); struct turnstile *turnstile_trywait(struct lock_object *); -void turnstile_unpend(struct turnstile *, int); +void turnstile_unpend(struct turnstile *); void turnstile_wait(struct turnstile *, struct thread *, int); struct thread *turnstile_lock(struct turnstile *, struct lock_object **); void turnstile_unlock(struct turnstile *, struct lock_object *); |