" /* Definition of " "struct robust_list_head" " */"
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
-.PP
+.P
.BI "long syscall(SYS_get_robust_list, int " pid ,
.BI " struct robust_list_head **" head_ptr ", size_t *" len_ptr );
.B long syscall(SYS_set_robust_list,
.BI " struct robust_list_head *" head ", size_t " len );
.fi
-.PP
+.P
.IR Note :
glibc provides no wrappers for these system calls,
necessitating the use of
.BR set_robust_list ().
The address of a thread's robust futex list can be obtained using
.BR get_robust_list ().
-.PP
+.P
The purpose of the robust futex list is to ensure that if a thread
accidentally fails to unlock a futex before terminating or calling
.BR execve (2),
.BR futex (2)
.B FUTEX_WAKE
operation on one of the threads waiting on the futex.
-.PP
+.P
The
.BR get_robust_list ()
system call returns the head of the robust futex list of the thread
.I **head_ptr
is stored in
.IR len_ptr .
-.PP
+.P
Permission to employ
.BR get_robust_list ()
is governed by a ptrace access mode
.B PTRACE_MODE_READ_REALCREDS
check; see
.BR ptrace (2).
-.PP
+.P
The
.BR set_robust_list ()
system call requests the kernel to record the head of the list of
.I len
does not equal
.IR "sizeof(struct\ robust_list_head)" .
-.PP
+.P
The
.BR get_robust_list ()
system call can fail with the following errors:
These system calls were added in Linux 2.6.17.
.SH NOTES
These system calls are not needed by normal applications.
-.PP
+.P
A thread can have only one robust futex list;
therefore applications that wish
to use this functionality should use the robust mutexes provided by glibc.
-.PP
+.P
In the initial implementation,
a thread waiting on a futex was notified that the owner had died
only if the owner terminated.
.\" commit 8141c7f3e7aee618312fa1c15109e1219de784a7
notification was extended to include the case where the owner performs an
.BR execve (2).
-.PP
+.P
The thread IDs mentioned in the main text are
.I kernel
thread IDs of the kind returned by
.SH SEE ALSO
.BR futex (2),
.BR pthread_mutexattr_setrobust (3)
-.PP
+.P
.I Documentation/robust\-futexes.txt
and
.I Documentation/robust\-futex\-ABI.txt