ENUM SYSTEM_STATES(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, welcome to the enum system_states(9) page 🌸 this is the enum of values used for system_state β€” literally the "what phase is the kernel in rn" vibe check. periodt.

✨ SYNOPSIS ✨

enum system_states {
    SYSTEM_BOOTING ,
    SYSTEM_SCHEDULING ,
    SYSTEM_FREEING_INITMEM ,
    SYSTEM_RUNNING ,
    SYSTEM_HALT ,
    SYSTEM_POWER_OFF ,
    SYSTEM_RESTART ,
    SYSTEM_SUSPEND

};

πŸŽ€ Constants πŸŽ€

  • SYSTEM_BOOTING β€” 0, no init needed πŸ‘Ά
  • SYSTEM_SCHEDULING β€” system is ready for scheduling; OK to use RCU ✨ she's awake and ready to run things
  • SYSTEM_FREEING_INITMEM β€” system is freeing all of initmem; almost running 😭 so close bestie
  • SYSTEM_RUNNING β€” system is up and running πŸ‘‘ main character energy
  • SYSTEM_HALT β€” system entered clean system halt state 🫢 peaceful exit vibes
  • SYSTEM_POWER_OFF β€” system entered shutdown/clean power off state πŸ’… lights out, iconic
  • SYSTEM_RESTART β€” system entered emergency power off or normal restart πŸ”₯ plot twist era
  • SYSTEM_SUSPEND β€” system entered suspend or hibernate state 🧚 nap time fr fr

⚠️ Note ⚠️

bestie do NOT reorder these states, okay? 😭 The ordering of the states must not be changed as code checks for <, <=, >, >= STATE. Like the comparisons are literally built on this order. no cap 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/kernel.h: might_sleep(9), cant_sleep(9), cant_migrate(9), non_block_start(9), non_block_end(9) πŸ’œ go read those too, iykyk.


mwah πŸ’‹ signed off from ./include/linux, October 2026 edition, for the enum system_states(9) manual β€” slay and stay ordered ✨

πŸ“¦ where this page comes from