1 .\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
2 .\" Written by Ivana Varekova <varekova@redhat.com>
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" FIXME Something could be added to this page (or exit(2))
25 .\" about exit_robust_list processing
27 .TH GET_ROBUST_LIST 2 2012-05-03 Linux "Linux System Calls"
29 get_robust_list, set_robust_list \- get/set list of robust futexes
32 .B #include <linux/futex.h>
33 .B #include <syscall.h>
35 .BI "long get_robust_list(int " pid ", struct robust_list_head **" head_ptr ,
36 .BI " size_t *" len_ptr );
37 .BI "long set_robust_list(struct robust_list_head *" head ", size_t " len );
40 The robust futex implementation needs to maintain per-thread lists of robust
41 futexes which are unlocked when the thread exits.
42 These lists are managed in user space; the kernel is only notified about
43 the location of the head of the list.
46 .BR get_robust_list ()
47 system call returns the head of the robust futex list of the thread
48 whose thread ID is specified in
53 the head of the list for the calling thread is returned.
54 The list head is stored in the location pointed to by
56 The size of the object pointed to by
62 .BR set_robust_list ()
63 system call requests the kernel to record the head of the list of
64 robust futexes owned by the calling thread.
67 argument is the list head to record.
74 .BR set_robust_list ()
76 .BR get_robust_list ()
77 system calls return zero when the operation is successful,
78 an error code otherwise.
81 .BR set_robust_list ()
82 system call can fail with the following error:
86 does not match the size of structure
87 .B struct robust_list_head
91 .BR get_robust_list ()
92 system call can fail with the following errors:
95 The calling process does not have permission to see the robust futex list of
96 the thread with the thread ID
103 No thread with the thread ID
108 The head of the robust futex list can't be stored at the location
111 These system calls were added in Linux 2.6.17.
112 No library support is provided; use
115 These system calls are not needed by normal applications.
116 No support for them is provided in glibc.
118 A thread can have only one robust futex list;
119 therefore applications that wish
120 to use this functionality should use the robust mutexes provided by glibc.
123 .\" .BR pthread_mutexattr_setrobust_np (3)
125 The kernel source files
126 .IR Documentation/robust-futexes.txt
128 .IR Documentation/robust-futex-ABI.txt .
129 .\" http://lwn.net/Articles/172149/