logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

PR_GET_TID_ADDRESS - get the clear_child_tid address

Caveats

Note that since the prctl() system call does not have a compat implementation for the AMD64 x32 and MIPS n32 ABIs, and the kernel writes out a pointer using the kernel's pointer size, this operation expects a user-space buffer of 8 (not 4) bytes on these ABIs.

Description

Return the clear_child_tid address set by set_tid_address(2) and the clone(2) CLONE_CHILD_CLEARTID flag, in the location pointed to by addrp. This feature is available only if the kernel is built with the CONFIG_CHECKPOINT_RESTORE option enabled.

Errors

EFAULTaddrp is an invalid address.

History

Linux 3.5.

Library

Standard C library (libc, -lc)

Name

PR_GET_TID_ADDRESS - get the clear_child_tid address

Return Value

On success, 0 is returned. On error, -1 is returned, and errno is set to indicate the error.

See Also

prctl(2) Linux man-pages 6.9.1 2024-06-02 PR_GET_TID_ADDRESS(2const)

Standards

Linux.

Synopsis

#include<linux/prctl.h> /* Definition of PR_* constants */ #include<sys/prctl.h>intprctl(PR_GET_TID_ADDRESS,int**addrp);

See Also