is_global_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– is_global_init(9) πŸ’–

okay bestie, welcome to is_global_init(9) from the Kernel API Manual β€” this is the little function that does a very specific vibe check on task structures, and honestly? iconic. ✨


🌸 NAME 🌸

is_global_init β€” check if a task structure is init. Since init is free to have sub-threads, we need to check tgid. 🫢


πŸŽ€ SYNOPSIS πŸŽ€

int is_global_init (struct task_struct *tsk );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • tsk β€” the task structure that's getting checked, aka the main character of this function call πŸ’…

✨ DESCRIPTION ✨

Check if a task structure is the first user space task the kernel created. That's it, that's the whole job β€” but it's important, and it ate. πŸ”₯


🌈 RETURN 🌈

Returns 1 if the task structure is init. Returns 0 otherwise. no cap, those are the only two outcomes πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘


β€” cute little sign-off: brought to you by ./include/linux, October 2026, and the page is_global_init(9) πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from