| 1 |
.\" Copyright 2014, 2015, Michael Kerrisk <[email protected]> |
| 2 |
.\" Copyright 2024, Alejandro Colomar <[email protected]> |
| 3 |
.\" |
| 4 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 5 |
.\" |
| 6 |
.TH PR_GET_THP_DISABLE 2const 2024-06-01 "Linux man-pages 6.9.1" |
| 7 |
.SH NAME |
| 8 |
PR_GET_THP_DISABLE |
| 9 |
\- |
| 10 |
get the state of the "THP disable" flag for the calling thread |
| 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 |
.B int prctl(PR_GET_THP_DISABLE, 0L, 0L, 0L, 0L); |
| 20 |
.fi |
| 21 |
.SH DESCRIPTION |
| 22 |
Return the current setting of |
| 23 |
the "THP disable" flag for the calling thread: |
| 24 |
either 1, if the flag is set, or 0, if it is not. |
| 25 |
.SH RETURN VALUE |
| 26 |
On success, |
| 27 |
.BR PR_GET_THP_DISABLE , |
| 28 |
returns the boolean value described above. |
| 29 |
On error, \-1 is returned, and |
| 30 |
.I errno |
| 31 |
is set to indicate the error. |
| 32 |
.SH STANDARDS |
| 33 |
Linux. |
| 34 |
.SH HISTORY |
| 35 |
Linux 3.15. |
| 36 |
.SH SEE ALSO |
| 37 |
.BR prctl (2), |
| 38 |
.BR PR_SET_THP_DISABLE (2const) |