WaitQueue
Defined in: src/wait.ts:11
Somewhere for tasks to sleep until something happens, i.e. wait_queue_head_t.
Nothing here actually sleeps a thread: the process is already blocked on the shared page while the kernel works, so a waiter is just a promise the kernel holds until whatever it is waiting on wakes it.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new WaitQueue():
WaitQueue
Returns
Section titled “Returns”WaitQueue
Properties
Section titled “Properties”waiters
Section titled “waiters”
protectedreadonlywaiters:Set<() =>void>
Defined in: src/wait.ts:12
Accessors
Section titled “Accessors”waiting
Section titled “waiting”Get Signature
Section titled “Get Signature”get waiting():
number
Defined in: src/wait.ts:14
Returns
Section titled “Returns”number
Methods
Section titled “Methods”wait()
Section titled “wait()”wait():
Promise<void>
Defined in: src/wait.ts:19
Sleep until something wakes the queue, i.e. add_wait_queue and then schedule
Returns
Section titled “Returns”Promise<void>
wait_with()
Section titled “wait_with()”wait_with(
waiter): () =>void
Defined in: src/wait.ts:35
Wake up a waiter, i.e. add_wait_queue and remove_wait_queue around one sleep.
Parameters
Section titled “Parameters”waiter
Section titled “waiter”() => void
Returns
Section titled “Returns”a function that stops waiting without the queue having been woken
() => void
wake_up()
Section titled “wake_up()”wake_up():
void
Defined in: src/wait.ts:41
Wake everything on the queue, i.e. wake_up
Returns
Section titled “Returns”void