other versions
- stretch 4.9.168-1
GET_FUTEX_KEY(9) | Futex API reference | GET_FUTEX_KEY(9) |
NAME¶
get_futex_key - Get parameters which are the keys for a futexSYNOPSIS¶
int get_futex_key(u32 __user * uaddr, int fshared, union futex_key * key, int rw);
ARGUMENTS¶
uaddrvirtual address of the futex
fshared
0 for a PROCESS_PRIVATE futex, 1 for PROCESS_SHARED
key
address where result is stored.
rw
mapping needs to be read/write (values: VERIFY_READ,
VERIFY_WRITE)
RETURN¶
a negative error code or 0The key words are stored in *key on success.
For shared mappings, it's (page->index, file_inode(vma->vm_file), offset_within_page). For private mappings, it's (uaddr, current->mm). We can usually work out the index without swapping in the page.
lock_page might sleep, the caller should not hold a spinlock.
AUTHOR¶
Rusty Russell <rusty@rustcorp.com.au>Author.
COPYRIGHT¶
April 2019 | Kernel Hackers Manual 4.9. |