get_futex_key — Get parameters which are the keys for a futex
int get_futex_key ( | u32 __user * uaddr, |
| int fshared, | |
| union futex_key * key, | |
int rw); |
uaddrvirtual address of the futex
fshared0 for a PROCESS_PRIVATE futex, 1 for PROCESS_SHARED
keyaddress where result is stored.
rwmapping needs to be read/write (values: VERIFY_READ, VERIFY_WRITE)
a negative error code or 0
The key words are stored in *key on success.
For shared mappings (when fshared), the key is:
( inode->i_sequence, page->index, offset_within_page )
[ also see get_inode_sequence_number ]
For private mappings (or when !fshared), the key is:
( current->mm, address, 0 )
This allows (cross process, where applicable) identification of the futex without keeping the page pinned for the duration of the FUTEX_WAIT.
lock_page might sleep, the caller should not hold a spinlock.