futex_requeue — Requeue waiters from uaddr1 to uaddr2


int futex_requeue (u32 __user * uaddr1,
 unsigned int flags,
 u32 __user * uaddr2,
 int nr_wake,
 int nr_requeue,
 u32 * cmpval,
 int requeue_pi);


u32 __user * uaddr1

source futex user address

unsigned int flags

futex flags (FLAGS_SHARED, etc.)

u32 __user * uaddr2

target futex user address

int nr_wake

number of waiters to wake (must be 1 for requeue_pi)

int nr_requeue

number of waiters to requeue (0-INT_MAX)

u32 * cmpval

uaddr1 expected value (or NULL)

int requeue_pi

if we are attempting to requeue from a non-pi futex to a pi futex (pi to pi requeue is not supported)


Requeue waiters on uaddr1 to uaddr2. In the requeue_pi case, try to acquire uaddr2 atomically on behalf of the top waiter.


>=0 - on success, the number of tasks requeued or woken; <0 - on error