mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
parent
969dcc5f49
commit
5771601bf4
2 changed files with 21 additions and 0 deletions
|
|
@ -854,6 +854,26 @@ sleepq_remove_thread(struct sleepqueue *sq, struct thread *td)
|
|||
(void *)td, (long)td->td_proc->p_pid, td->td_name);
|
||||
}
|
||||
|
||||
void
|
||||
sleepq_remove_nested(struct thread *td)
|
||||
{
|
||||
struct sleepqueue_chain *sc;
|
||||
struct sleepqueue *sq;
|
||||
const void *wchan;
|
||||
|
||||
MPASS(TD_ON_SLEEPQ(td));
|
||||
|
||||
wchan = td->td_wchan;
|
||||
sc = SC_LOOKUP(wchan);
|
||||
mtx_lock_spin(&sc->sc_lock);
|
||||
sq = sleepq_lookup(wchan);
|
||||
MPASS(sq != NULL);
|
||||
thread_lock(td);
|
||||
sleepq_remove_thread(sq, td);
|
||||
mtx_unlock_spin(&sc->sc_lock);
|
||||
/* Returns with the thread lock owned. */
|
||||
}
|
||||
|
||||
#ifdef INVARIANTS
|
||||
/*
|
||||
* UMA zone item deallocator.
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ void sleepq_release(const void *wchan);
|
|||
void sleepq_remove(struct thread *td, const void *wchan);
|
||||
int sleepq_remove_matching(struct sleepqueue *sq, int queue,
|
||||
bool (*matches)(struct thread *), int pri);
|
||||
void sleepq_remove_nested(struct thread *td);
|
||||
int sleepq_signal(const void *wchan, int flags, int pri, int queue);
|
||||
void sleepq_set_timeout_sbt(const void *wchan, sbintime_t sbt,
|
||||
sbintime_t pr, int flags);
|
||||
|
|
|
|||
Loading…
Reference in a new issue