summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-04-06 19:07:21 +0000
committerjhb <jhb@FreeBSD.org>2004-04-06 19:07:21 +0000
commit8ab84688c3dd4465acbea2186a9d970263498ea6 (patch)
treee86b2f06d6ea68eddc54e1106e60ff7bacfee1a9 /sys
parenta048052df8fed915b18d497ad6a209a8517840d6 (diff)
downloadFreeBSD-src-8ab84688c3dd4465acbea2186a9d970263498ea6.zip
FreeBSD-src-8ab84688c3dd4465acbea2186a9d970263498ea6.tar.gz
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_turnstile.c4
-rw-r--r--sys/sys/turnstile.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c
index f84181d..8994a1e 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 4bfa702..02a32df 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 *);
OpenPOWER on IntegriCloud