user_regset_active_fn(9)
π user_regset_active_fn(9)
okay so bestie, you've stumbled into the Kernel API Manual and this one is about a little typedef called user_regset_active_fn β it's the type of the @active function inside &struct user_regset. iykyk π«Ά
β¨ SYNOPSIS β¨
typedef int user_regset_active_fn (struct task_struct *target , const
struct user_regset *regset );
like, that's the whole signature. short king behavior honestly π
π ARGUMENTS π
targetβ the thread we're being nosy about and examining πregsetβ the regset we're examining, periodt
πΈ DESCRIPTION πΈ
ok so the vibe check here is: what does your implementation return? and the answer depends, no cap πββοΈ
- Return
-ENODEVif it's not available on the hardware that was found. it's giving "not supported on this β¨siliconβ¨" π - Return
0if there's no interesting state in this thread. nothing to see here bestie. - Return
>0β that number being the number of size units of interesting state. so like,>0= there is tea π
and here's the important bit, so don't skip it: any get call that fetches state beyond that number will see the default initialization state for this data. which means β huge β a caller that already knows what the default state is need not copy it all out. efficiency slay π₯
π«Ά important caveat: this call is optional. the pointer isNULLif there's no inexpensive check to yield a value< n. so if you seeNULL, that's not a bug, that's just the design, bestie.
π SEE ALSO π
Kernel file ./include/linux/regset.h, plus the whole friend group:
user_regset_set_fn(9)user_regset_writeback_fn(9)struct user_regset(9)struct user_regset_view(9)task_user_regset_view(9)copy_regset_from_user(9)
ok that's the whole page, mwah π it lives in ./include/linux, and this lil manual page was brought to you by October 2026 β see you in the next group chat, bestie π¦β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms