Debian Codegraph @

upstream/debian-unstable/man2/PR_SET_TSC.2const

raw
1 .\" Copyright 2008, Erik Bosman <[email protected]>
2 .\" Copyright 2008-2015, Michael Kerrisk <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH PR_SET_TSC 2const 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 PR_SET_TSC
10 \-
11 change whether the timestamp counter can be read by the process
12 .SH LIBRARY
13 Standard C library
14 .RI ( libc ,\~ \-lc )
15 .SH SYNOPSIS
16 .nf
17 .BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */"
18 .B #include <sys/prctl.h>
19 .P
20 .BI "int prctl(PR_SET_TSC, long " flag );
21 .fi
22 .SH DESCRIPTION
23 Set the state of the flag determining whether the timestamp counter
24 can be read by the process.
25 Pass
26 .B PR_TSC_ENABLE
27 to
28 .I flag
29 to allow it to be read, or
30 .B PR_TSC_SIGSEGV
31 to generate a
32 .B SIGSEGV
33 when the process tries to read the timestamp counter.
34 .SH RETURN VALUE
35 On success,
36 0 is returned.
37 On error, \-1 is returned, and
38 .I errno
39 is set to indicate the error.
40 .SH ERRORS
41 .TP
42 .B EINVAL
43 .I flag
44 is not a valid value.
45 .SH STANDARDS
46 Linux.
47 x86 only.
48 .SH HISTORY
49 Linux 2.6.26 (x86).
50 .SH SEE ALSO
51 .BR prctl (2),
52 .BR PR_GET_TSC (2const)