PR_FUTEX_HASH_GET_SLOTS(2const)
π PR_FUTEX_HASH_GET_SLOTS(2const) π
okay bestie, pull up a chair because we're reading a manual page together and honestly? this one is short and sweet. it's PR_FUTEX_HASH_GET_SLOTS, living its best life in section 2const of the manual, and it does exactly one thing: it tells you how big your private hash is. that's it. that's the whole vibe. π¦
β¨ NAME β¨
PR_FUTEX_HASH_GET_SLOTS β return the size of the private hash π
π LIBRARY π
Standard C library (libc, -lc). yes queen, you just link with -lc like always π
π SYNOPSIS π
#include <linux/prctl.h> /* Definition of PR_* constants */
#include <sys/prctl.h>
int prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_GET_SLOTS);
so you're calling prctl(2) β the big one β and you're handing it two things: the PR_FUTEX_HASH operation, and then PR_FUTEX_HASH_GET_SLOTS as the thing you actually want it to do. no extra args, no drama. β¨
πΈ DESCRIPTION πΈ
Return the current size of the private hash.
that's literally it, and honestly? iconic of it to be this straightforward. it looks at the private hash and hands you back its current size. no cap. π«Ά
π₯ RETURN VALUE π₯
here's where you gotta pay attention, because the number coming back is doing double duty and you need to read it right:
0β this means a private hash has not been allocated, and the global hash is in use instead. so no private hash era yet bestie π- a value
>0β this specifies the size of the private hash. she's real, she's allocated, and this is how big she is π - on error,
-1is returned, anderrnois set to indicate the error. classic error behaviour, we know it, we respect it.
ngl, that 0 case is the sneaky one β it's not "size zero", it's "no private hash, we're on the global one". read the vibes correctly π
π STANDARDS π
Linux. just Linux. periodt. π
β HISTORY β
Linux 6.17. freshly added, main character energy since day one β¨
π¦ SEE ALSO π¦
and that's the whole page, bestie, you ate it π go forth and query your private hash size with confidence. this was brought to you by Linux man-pages 6.20, dated 2025-08-19 β mwah, love that for us ππ§
π¦ 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