Scroll to navigation

FUTEX_REQUEUE(9) Futex API reference FUTEX_REQUEUE(9)

NAME

futex_requeue - Requeue waiters from uaddr1 to uaddr2

SYNOPSIS

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

ARGUMENTS

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)

DESCRIPTION

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

RETURN

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

AUTHOR

Rusty Russell <rusty@rustcorp.com.au>

Author.

COPYRIGHT

July 2017 Kernel Hackers Manual 4.12