DENX . Training2 . LddNonBlockingIo

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);

----- Revision r1.1 - 25 Feb 2008 - 14:41 - MarkusKlotzbuecher
Copyright © 2002-2019 by DENX Software Engineering