From ef2c0ba7e421b00f1385a9a585de2f55d4bfca31 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 6 Apr 2004 19:07:21 +0000 Subject: [PATCH] Rename turnstile_wakeup() to turnstile_broadcast() to make the naming more consistent with other APIs. sleepq and cv's use signal/broadcast, and msleep uses wakeup_one/wakeup. Prior to this turnstiles were using a signal/wakeup mixture. --- sys/kern/subr_turnstile.c | 4 ++-- sys/sys/turnstile.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index f84181d6d32..8994a1e0723 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -234,7 +234,7 @@ propagate_priority(struct thread *td) * finish waking this thread up. We can detect this case * by checking to see if this thread has been given a * turnstile by either turnstile_signal() or - * turnstile_wakeup(). In this case, treat the thread as + * turnstile_broadcast(). In this case, treat the thread as * if it was already running. */ if (td->td_turnstile != NULL) { @@ -567,7 +567,7 @@ turnstile_signal(struct turnstile *ts) * the turnstile chain locked. */ void -turnstile_wakeup(struct turnstile *ts) +turnstile_broadcast(struct turnstile *ts) { struct turnstile_chain *tc; struct turnstile *ts1; diff --git a/sys/sys/turnstile.h b/sys/sys/turnstile.h index 4bfa7020944..02a32dfbd80 100644 --- a/sys/sys/turnstile.h +++ b/sys/sys/turnstile.h @@ -43,10 +43,10 @@ * thread needs to retry a lock operation instead of blocking, it should * call turnstile_release() to unlock the associated turnstile chain lock. * - * When a lock is released, either turnstile_signal() or turnstile_wakeup() + * When a lock is released, either turnstile_signal() or turnstile_broadcast() * is called to mark blocked threads for a pending wakeup. * turnstile_signal() marks the highest priority blocked thread while - * turnstile_wakeup() marks all blocked threads. The turnstile_signal() + * turnstile_broadcast() marks all blocked threads. The turnstile_signal() * function returns true if the turnstile became empty as a result. After * the higher level code finishes releasing the lock, turnstile_unpend() * must be called to wakeup the pending thread(s). @@ -82,7 +82,7 @@ int turnstile_signal(struct turnstile *); void turnstile_unpend(struct turnstile *); void turnstile_wait(struct turnstile *, struct lock_object *, struct thread *); -void turnstile_wakeup(struct turnstile *); +void turnstile_broadcast(struct turnstile *); struct thread *turnstile_head(struct turnstile *); int turnstile_empty(struct turnstile *);