1 .\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
2 .\" Written by Ivana Varekova <varekova@redhat.com>
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
26 .\" FIXME Something could be added to this page (or exit(2))
27 .\" about exit_robust_list processing
29 .TH GET_ROBUST_LIST 2 2014-05-10 Linux "Linux System Calls"
31 get_robust_list, set_robust_list \- get/set list of robust futexes
34 .B #include <linux/futex.h>
35 .B #include <sys/types.h>
36 .B #include <syscall.h>
38 .BI "long get_robust_list(int " pid ", struct robust_list_head **" head_ptr ,
39 .BI " size_t *" len_ptr );
40 .BI "long set_robust_list(struct robust_list_head *" head ", size_t " len );
44 There are no glibc wrappers for these system calls; see NOTES.
46 The robust futex implementation needs to maintain per-thread lists of robust
47 futexes which are unlocked when the thread exits.
48 These lists are managed in user space; the kernel is notified about only
49 the location of the head of the list.
52 .BR get_robust_list ()
53 system call returns the head of the robust futex list of the thread
54 whose thread ID is specified in
59 the head of the list for the calling thread is returned.
60 The list head is stored in the location pointed to by
62 The size of the object pointed to by
68 .BR set_robust_list ()
69 system call requests the kernel to record the head of the list of
70 robust futexes owned by the calling thread.
73 argument is the list head to record.
80 .BR set_robust_list ()
82 .BR get_robust_list ()
83 system calls return zero when the operation is successful,
84 an error code otherwise.
87 .BR set_robust_list ()
88 system call can fail with the following error:
92 does not match the size of structure
93 .B struct robust_list_head
97 .BR get_robust_list ()
98 system call can fail with the following errors:
101 The calling process does not have permission to see the robust futex list of
102 the thread with the thread ID
104 and does not have the
109 No thread with the thread ID
114 The head of the robust futex list can't be stored at the location
117 These system calls were added in Linux 2.6.17.
118 No library support is provided; use
121 These system calls are not needed by normal applications.
122 No support for them is provided in glibc.
123 In the unlikely event that you want to call them directly, use
126 A thread can have only one robust futex list;
127 therefore applications that wish
128 to use this functionality should use the robust mutexes provided by glibc.
131 .\" .BR pthread_mutexattr_setrobust_np (3)
133 .IR Documentation/robust-futexes.txt
135 .IR Documentation/robust-futex-ABI.txt
136 in the Linux kernel source tree
137 .\" http://lwn.net/Articles/172149/
139 This page is part of release 3.67 of the Linux
142 A description of the project,
143 information about reporting bugs,
144 and the latest version of this page,
146 \%http://www.kernel.org/doc/man\-pages/.