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 2012-07-13 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 <syscall.h>
37 .BI "long get_robust_list(int " pid ", struct robust_list_head **" head_ptr ,
38 .BI " size_t *" len_ptr );
39 .BI "long set_robust_list(struct robust_list_head *" head ", size_t " len );
43 There are no glibc wrappers for these system calls; see NOTES.
45 The robust futex implementation needs to maintain per-thread lists of robust
46 futexes which are unlocked when the thread exits.
47 These lists are managed in user space; the kernel is notified about only
48 the location of the head of the list.
51 .BR get_robust_list ()
52 system call returns the head of the robust futex list of the thread
53 whose thread ID is specified in
58 the head of the list for the calling thread is returned.
59 The list head is stored in the location pointed to by
61 The size of the object pointed to by
67 .BR set_robust_list ()
68 system call requests the kernel to record the head of the list of
69 robust futexes owned by the calling thread.
72 argument is the list head to record.
79 .BR set_robust_list ()
81 .BR get_robust_list ()
82 system calls return zero when the operation is successful,
83 an error code otherwise.
86 .BR set_robust_list ()
87 system call can fail with the following error:
91 does not match the size of structure
92 .B struct robust_list_head
96 .BR get_robust_list ()
97 system call can fail with the following errors:
100 The calling process does not have permission to see the robust futex list of
101 the thread with the thread ID
103 and does not have the
108 No thread with the thread ID
113 The head of the robust futex list can't be stored at the location
116 These system calls were added in Linux 2.6.17.
117 No library support is provided; use
120 These system calls are not needed by normal applications.
121 No support for them is provided in glibc.
122 In the unlikely event that you want to call them directly, use
125 A thread can have only one robust futex list;
126 therefore applications that wish
127 to use this functionality should use the robust mutexes provided by glibc.
130 .\" .BR pthread_mutexattr_setrobust_np (3)
132 .IR Documentation/robust-futexes.txt
134 .IR Documentation/robust-futex-ABI.txt
135 in the Linux kernel source tree
136 .\" http://lwn.net/Articles/172149/