1GET_ROBUST_LIST(2)            Linux System Calls            GET_ROBUST_LIST(2)
2
3
4

NAME

6       get_robust_list, set_robust_list - get/set list of robust futexes
7

SYNOPSIS

9       #include <linux/futex.h>
10       #include <syscall.h>
11
12       long get_robust_list(int pid, struct robust_list_head **head_ptr,
13                        size_t *len_ptr);
14       long set_robust_list(struct robust_list_head *head, size_t len);
15
16       Note: There are no glibc wrappers for these system calls; see NOTES.
17

DESCRIPTION

19       The  robust  futex implementation needs to maintain per-thread lists of
20       robust futexes which are unlocked when the thread exits.   These  lists
21       are  managed in user space; the kernel is notified about only the loca‐
22       tion of the head of the list.
23
24       The get_robust_list() system call returns the head of the robust  futex
25       list  of  the thread whose thread ID is specified in pid.  If pid is 0,
26       the head of the list for the calling thread is returned.  The list head
27       is  stored  in  the  location  pointed to by head_ptr.  The size of the
28       object pointed to by **head_ptr is stored in len_ptr.
29
30       The set_robust_list() system call requests the  kernel  to  record  the
31       head  of  the  list of robust futexes owned by the calling thread.  The
32       head argument is the list head to record.  The len argument  should  be
33       sizeof(*head).
34

RETURN VALUE

36       The  set_robust_list()  and  get_robust_list() system calls return zero
37       when the operation is successful, an error code otherwise.
38

ERRORS

40       The set_robust_list() system call can fail with the following error:
41
42       EINVAL len does not match the size of structure struct robust_list_head
43              expected by kernel.
44
45       The get_robust_list() system call can fail with the following errors:
46
47       EPERM  The  calling  process does not have permission to see the robust
48              futex list of the thread with the thread ID pid,  and  does  not
49              have the CAP_SYS_PTRACE capability.
50
51       ESRCH  No thread with the thread ID pid could be found.
52
53       EFAULT The  head  of the robust futex list can't be stored at the loca‐
54              tion head.
55

VERSIONS

57       These system calls were added in Linux 2.6.17.  No library  support  is
58       provided; use syscall(2).
59

NOTES

61       These  system  calls are not needed by normal applications.  No support
62       for them is provided in glibc.  In the unlikely event that you want  to
63       call them directly, use syscall(2).
64
65       A  thread  can  have only one robust futex list; therefore applications
66       that wish to use this functionality should use the robust mutexes  pro‐
67       vided by glibc.
68

SEE ALSO

70       futex(2)
71
72       Documentation/robust-futexes.txt and Documentation/robust-futex-ABI.txt
73       in the Linux kernel source tree
74

COLOPHON

76       This page is part of release 3.53 of the Linux  man-pages  project.   A
77       description  of  the project, and information about reporting bugs, can
78       be found at http://www.kernel.org/doc/man-pages/.
79
80
81
82Linux                             2012-07-13                GET_ROBUST_LIST(2)
Impressum