PR_GET_THP_DISABLE(2const)

πŸ’– PR_GET_THP_DISABLE(2const) β€” a.k.a. the manual page you're reading, bestie πŸ’–

okay so this is PR_GET_THP_DISABLE(2const) and it's literally the girl whose whole job is peeking at your thread's "THP disable" flags. she doesn't set anything, she doesn't change anything, she just looks and reports back. a true observer. main character energy but make it read-only. πŸ¦‹


✨ NAME ✨

PR_GET_THP_DISABLE β€” get the state of the "THP disable" flags for the calling thread πŸ’…

πŸŽ€ LIBRARY πŸŽ€

Standard C library (libc, -lc) β€” yeah, the usual. she lives there.

🌸 SYNOPSIS 🌸

#include <linux/prctl.h>  /* Definition of PR_* constants */
#include <sys/prctl.h>

int prctl(PR_GET_THP_DISABLE, 0L, 0L, 0L, 0L);

not me calling prctl() with that many 0Ls β€” girl, they're all zeros, everyone just follow along, it's fine. 🫢

πŸ’€ DESCRIPTION πŸ’€

She returns a value whose bits tell you how THP-disable is configured for the calling thread. That's the vibe check. Then you interpret the returned bits like this:

  • 0b00 β€” no THP-disable behavior specified. literally nothing's been said. untouched. pristine. ✨
  • 0b01 β€” THP is entirely disabled for this process. all of it. gone. blocked. πŸ™ˆ
  • 0b11 β€” THP-except-advised mode is set for this process. so it's giving "only where advised" energy. iykyk. 🌈
heads up: this is bit-y business, so read the returned value as bits, not as a regular "oh it's 1 or 3" situation. the description above is the whole truth and nothing but. πŸ’œ

⭐ RETURN VALUE ⭐

On success, PR_GET_THP_DISABLE returns the value described above (the bit-thing from the DESCRIPTION, you got this). πŸ‘‘

On error, -1 is returned, and errno is set to indicate the error. classic. love that for us. 😭

πŸ”₯ STANDARDS πŸ”₯

Linux. that's it. that's the section. periodt. πŸ’…

🧚 HISTORY 🧚

Linux 3.15. an icon, an era, a moment. πŸŽ€

🌟 SEE ALSO 🌟


and that's the page, bestie!! go forth and read your flags responsibly πŸ’–βœ¨ no cap, this was Linux man-pages 6.20, dated 2026-02-08, and yes she slayed every single line of it. bye bye πŸ‘‘πŸŒˆπŸŒΈ

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms