mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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.
This commit is contained in:
parent
a7b0c31480
commit
ef2c0ba7e4
2 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 *);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue