Skip to main content.

5.3.6. Non-Blocking IO

API: waitqueues

type:

wait_queue_head_t

linux/wait.h

Declaration:

/* compile time */
DECLARE_WAIT_QUEUE_HEAD(name); 

/* run time */
wait_queue_head_t q;
init_waitqueue_head(&q);

Sleeping:

wait_event(queue, condition)
wait_event_interruptible(queue, condition)
wait_event_timeout(queue, condition, timeout)
wait_event_interruptible_timeout(queue, condition, timeout)

waking up sleeping processes:

void wake_up(wait_queue_head_t *queue);
void wake_up_interruptible(wait_queue_head_t *queue);

specialities:

deprecated:

void sleep_on(wait_queue_head_t *q);
void interruptible_sleep_on(wait_queue_head_t *q);

5.3.5. The read and write system calls 1. Denx Training Topics 5.3.7. poll and =select=
Prev Home Next