sched: add wait begin/end functions that don't change thread state
these functions can be used when waiting on multiple queues at once, to prevent the thread state from being changed unexpectedly while initialising a set of wait items.
This commit is contained in:
@@ -32,6 +32,12 @@ struct waitqueue {
|
||||
extern void wait_item_init(struct wait_item *item, struct thread *thr);
|
||||
extern void thread_wait_begin(struct wait_item *waiter, struct waitqueue *q);
|
||||
extern void thread_wait_end(struct wait_item *waiter, struct waitqueue *q);
|
||||
extern void thread_wait_begin_nosleep(
|
||||
struct wait_item *waiter,
|
||||
struct waitqueue *q);
|
||||
extern void thread_wait_end_nosleep(
|
||||
struct wait_item *waiter,
|
||||
struct waitqueue *q);
|
||||
extern void wait_on_queue(struct waitqueue *q);
|
||||
extern void wakeup_queue(struct waitqueue *q);
|
||||
extern void wakeup_one(struct waitqueue *q);
|
||||
|
||||
Reference in New Issue
Block a user