wait.c File Reference

Go to the source code of this file.

Functions

void init_waitqueue_head (wait_queue_head_t *q)
 EXPORT_SYMBOL (init_waitqueue_head)
void add_wait_queue (wait_queue_head_t *q, wait_queue_t *wait)
 EXPORT_SYMBOL (add_wait_queue)
void add_wait_queue_exclusive (wait_queue_head_t *q, wait_queue_t *wait)
 EXPORT_SYMBOL (add_wait_queue_exclusive)
void remove_wait_queue (wait_queue_head_t *q, wait_queue_t *wait)
 EXPORT_SYMBOL (remove_wait_queue)
void prepare_to_wait (wait_queue_head_t *q, wait_queue_t *wait, int state)
 EXPORT_SYMBOL (prepare_to_wait)
void prepare_to_wait_exclusive (wait_queue_head_t *q, wait_queue_t *wait, int state)
 EXPORT_SYMBOL (prepare_to_wait_exclusive)
void finish_wait (wait_queue_head_t *q, wait_queue_t *wait)
 EXPORT_SYMBOL (finish_wait)
void abort_exclusive_wait (wait_queue_head_t *q, wait_queue_t *wait, unsigned int mode, void *key)
 EXPORT_SYMBOL (abort_exclusive_wait)
int autoremove_wake_function (wait_queue_t *wait, unsigned mode, int sync, void *key)
 EXPORT_SYMBOL (autoremove_wake_function)
int wake_bit_function (wait_queue_t *wait, unsigned mode, int sync, void *arg)
 EXPORT_SYMBOL (wake_bit_function)
int __sched __wait_on_bit (wait_queue_head_t *wq, struct wait_bit_queue *q, int(*action)(void *), unsigned mode)
 EXPORT_SYMBOL (__wait_on_bit)
int __sched out_of_line_wait_on_bit (void *word, int bit, int(*action)(void *), unsigned mode)
 EXPORT_SYMBOL (out_of_line_wait_on_bit)
int __sched __wait_on_bit_lock (wait_queue_head_t *wq, struct wait_bit_queue *q, int(*action)(void *), unsigned mode)
 EXPORT_SYMBOL (__wait_on_bit_lock)
int __sched out_of_line_wait_on_bit_lock (void *word, int bit, int(*action)(void *), unsigned mode)
 EXPORT_SYMBOL (out_of_line_wait_on_bit_lock)
void __wake_up_bit (wait_queue_head_t *wq, void *word, int bit)
 EXPORT_SYMBOL (__wake_up_bit)
void wake_up_bit (void *word, int bit)
 wake_up_bit - wake up a waiter on a bit : the word being waited on, a kernel virtual address : the bit of the word being waited on
 EXPORT_SYMBOL (wake_up_bit)
wait_queue_head_t * bit_waitqueue (void *word, int bit)
 EXPORT_SYMBOL (bit_waitqueue)


Function Documentation

int __sched __wait_on_bit ( wait_queue_head_t *  wq,
struct wait_bit_queue *  q,
int(*)(void *)  action,
unsigned  mode 
)

Definition at line 197 of file wait.c.

int __sched __wait_on_bit_lock ( wait_queue_head_t *  wq,
struct wait_bit_queue *  q,
int(*)(void *)  action,
unsigned  mode 
)

Definition at line 223 of file wait.c.

void __wake_up_bit ( wait_queue_head_t *  wq,
void *  word,
int  bit 
)

Definition at line 253 of file wait.c.

void abort_exclusive_wait ( wait_queue_head_t *  q,
wait_queue_t *  wait,
unsigned int  mode,
void *  key 
)

Definition at line 151 of file wait.c.

void add_wait_queue ( wait_queue_head_t *  q,
wait_queue_t *  wait 
)

Definition at line 25 of file wait.c.

void add_wait_queue_exclusive ( wait_queue_head_t *  q,
wait_queue_t *  wait 
)

Definition at line 36 of file wait.c.

int autoremove_wake_function ( wait_queue_t *  wait,
unsigned  mode,
int  sync,
void *  key 
)

Definition at line 166 of file wait.c.

wait_queue_head_t* bit_waitqueue ( void *  word,
int  bit 
)

Definition at line 288 of file wait.c.

EXPORT_SYMBOL ( bit_waitqueue   ) 

EXPORT_SYMBOL ( wake_up_bit   ) 

EXPORT_SYMBOL ( __wake_up_bit   ) 

EXPORT_SYMBOL ( out_of_line_wait_on_bit_lock   ) 

EXPORT_SYMBOL ( __wait_on_bit_lock   ) 

EXPORT_SYMBOL ( out_of_line_wait_on_bit   ) 

EXPORT_SYMBOL ( __wait_on_bit   ) 

EXPORT_SYMBOL ( wake_bit_function   ) 

EXPORT_SYMBOL ( autoremove_wake_function   ) 

EXPORT_SYMBOL ( abort_exclusive_wait   ) 

EXPORT_SYMBOL ( finish_wait   ) 

EXPORT_SYMBOL ( prepare_to_wait_exclusive   ) 

EXPORT_SYMBOL ( prepare_to_wait   ) 

EXPORT_SYMBOL ( remove_wait_queue   ) 

EXPORT_SYMBOL ( add_wait_queue_exclusive   ) 

EXPORT_SYMBOL ( add_wait_queue   ) 

EXPORT_SYMBOL ( init_waitqueue_head   ) 

void finish_wait ( wait_queue_head_t *  q,
wait_queue_t *  wait 
)

Definition at line 107 of file wait.c.

void init_waitqueue_head ( wait_queue_head_t *  q  ) 

Definition at line 17 of file wait.c.

int __sched out_of_line_wait_on_bit ( void *  word,
int  bit,
int(*)(void *)  action,
unsigned  mode 
)

Definition at line 212 of file wait.c.

int __sched out_of_line_wait_on_bit_lock ( void *  word,
int  bit,
int(*)(void *)  action,
unsigned  mode 
)

Definition at line 243 of file wait.c.

void prepare_to_wait ( wait_queue_head_t *  q,
wait_queue_t *  wait,
int  state 
)

Definition at line 71 of file wait.c.

void prepare_to_wait_exclusive ( wait_queue_head_t *  q,
wait_queue_t *  wait,
int  state 
)

Definition at line 85 of file wait.c.

void remove_wait_queue ( wait_queue_head_t *  q,
wait_queue_t *  wait 
)

Definition at line 47 of file wait.c.

int wake_bit_function ( wait_queue_t *  wait,
unsigned  mode,
int  sync,
void *  arg 
)

Definition at line 176 of file wait.c.

void wake_up_bit ( void *  word,
int  bit 
)

wake_up_bit - wake up a waiter on a bit : the word being waited on, a kernel virtual address : the bit of the word being waited on

There is a standard hashed waitqueue table for generic use. This is the part of the hashtable's accessor API that wakes up waiters on a bit. For instance, if one were to have waiters on a bitflag, one would call wake_up_bit() after clearing the bit.

In order for this to function properly, as it uses waitqueue_active() internally, some kind of memory barrier must be done prior to calling this. Typically, this will be smp_mb__after_clear_bit(), but in some cases where bitflags are manipulated non-atomically under a lock, one may need to use a less regular barrier, such fs/inode.c's smp_mb(), because spin_unlock() does not guarantee a memory barrier.

Definition at line 282 of file wait.c.


Generated on Wed Apr 11 06:39:16 2012 for DDE - The L4 Device Driver Environment by  doxygen 1.5.6