Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
futex_q Struct Reference

Data Fields

struct plist_node list
 
struct task_structtask
 
spinlock_tlock_ptr
 
union futex_key key
 
struct futex_pi_statepi_state
 
struct rt_mutex_waiterrt_waiter
 
union futex_keyrequeue_pi_key
 
u32 bitset
 

Detailed Description

struct futex_q - The hashed futex queue entry, one per waiting task : priority-sorted list of tasks waiting on this futex : the task waiting on the futex : the hash bucket lock : the key the futex is hashed on : optional priority inheritance state : rt_waiter storage for use with requeue_pi : the requeue_pi target futex key : bitset for the optional bitmasked wakeup

We use this hashed waitqueue, instead of a normal wait_queue_t, so we can wake only the relevant ones (hashed queues may be shared).

A futex_q has a woken state, just like tasks have TASK_RUNNING. It is considered woken when plist_node_empty(&q->list) || q->lock_ptr == 0. The order of wakeup is always to make the first condition true, then the second.

PI futexes are typically woken before they are removed from the hash list via the rt_mutex code. See unqueue_me_pi().

Definition at line 123 of file futex.c.

Field Documentation

u32 bitset

Definition at line 132 of file futex.c.

union futex_key key

Definition at line 128 of file futex.c.

Definition at line 124 of file futex.c.

spinlock_t* lock_ptr

Definition at line 127 of file futex.c.

Definition at line 129 of file futex.c.

union futex_key* requeue_pi_key

Definition at line 131 of file futex.c.

struct rt_mutex_waiter* rt_waiter

Definition at line 130 of file futex.c.

Definition at line 126 of file futex.c.


The documentation for this struct was generated from the following file: