| 1 |
.\" Copyright 2013-2015, Michael Kerrisk <[email protected]> |
| 2 |
.\" Copyright, the authors of the Linux man-pages project |
| 3 |
.\" |
| 4 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 5 |
.\" |
| 6 |
.TH PR_GET_TID_ADDRESS 2const 2026-02-08 "Linux man-pages 6.18" |
| 7 |
.SH NAME |
| 8 |
PR_GET_TID_ADDRESS |
| 9 |
\- |
| 10 |
get the clear_child_tid address |
| 11 |
.SH LIBRARY |
| 12 |
Standard C library |
| 13 |
.RI ( libc ,\~ \-lc ) |
| 14 |
.SH SYNOPSIS |
| 15 |
.nf |
| 16 |
.BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */" |
| 17 |
.B #include <sys/prctl.h> |
| 18 |
.P |
| 19 |
.BI "int prctl(PR_GET_TID_ADDRESS, int **" addrp ); |
| 20 |
.fi |
| 21 |
.SH DESCRIPTION |
| 22 |
Return the |
| 23 |
.I clear_child_tid |
| 24 |
address set by |
| 25 |
.BR set_tid_address (2) |
| 26 |
and the |
| 27 |
.BR clone (2) |
| 28 |
.B CLONE_CHILD_CLEARTID |
| 29 |
flag, in the location pointed to by |
| 30 |
.IR addrp . |
| 31 |
.P |
| 32 |
This feature is available only if the kernel is built with the |
| 33 |
.B CONFIG_CHECKPOINT_RESTORE |
| 34 |
option enabled. |
| 35 |
.SH RETURN VALUE |
| 36 |
On success, |
| 37 |
0 is returned. |
| 38 |
On error, \-1 is returned, and |
| 39 |
.I errno |
| 40 |
is set to indicate the error. |
| 41 |
.SH ERRORS |
| 42 |
.TP |
| 43 |
.B EFAULT |
| 44 |
.I addrp |
| 45 |
is an invalid address. |
| 46 |
.SH STANDARDS |
| 47 |
Linux. |
| 48 |
.SH HISTORY |
| 49 |
Linux 3.5. |
| 50 |
.\" commit 300f786b2683f8bb1ec0afb6e1851183a479c86d |
| 51 |
.SH CAVEATS |
| 52 |
Note that since the |
| 53 |
.BR prctl () |
| 54 |
system call does not have a compat implementation for |
| 55 |
the AMD64 x32 and MIPS n32 ABIs, |
| 56 |
and the kernel writes out a pointer using the kernel's pointer size, |
| 57 |
this operation expects a user-space buffer of 8 (not 4) bytes on these ABIs. |
| 58 |
.SH SEE ALSO |
| 59 |
.BR prctl (2) |