FUTEX_UNLOCK_PI − unlock a priorityâinheritance futex
Standard C library (libc, −lc)
#include
<linux/futex.h> /* Definition of FUTEX_*
constants */
#include <sys/syscall.h> /* Definition of
SYS_* constants */
#include <unistd.h>
long syscall(SYS_futex, uint32_t *uaddr, FUTEX_UNLOCK_PI);
This operation wakes the top priority waiter that is waiting in FUTEX_LOCK_PI(2const) or FUTEX_LOCK_PI2(2const) on the futex address provided by the uaddr argument.
This is called when the user-space value at uaddr cannot be changed atomically from a TID (of the owner) to 0.
On error, −1 is returned, and errno is set to indicate the error.
On success, FUTEX_UNLOCK_PI returns 0 if the futex was successfully unlocked.
See futex(2).
|
EINVAL |
The kernel detected an inconsistency between the user-space state at uaddr and the kernel state. This indicates either state corruption or that the kernel found a waiter on uaddr which is waiting via FUTEX_WAIT(2const) or FUTEX_WAIT_BITSET(2const). | ||
|
ENOSYS |
A run-time check determined that the operation is not available. The PI-futex operations are not implemented on all architectures and are not supported on some CPU variants. | ||
|
EPERM |
The caller does not own the lock represented by the futex word. |
Linux.
Linux 2.6.18.
futex(2)