UNION TMIGR_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ union tmigr_state(9) β€” a Kernel API Manual moment

okay so bestie, welcome to the Kernel API Manual and today's main character is union tmigr_state(9) β€” literally the state of tmigr_group, no cap ✨


🌸 NAME 🌸

union tmigr_state β€” the state of tmigr_group 🫢


✨ SYNOPSIS ✨

like, here's the whole vibe, exactly as it lives:

union tmigr_state {
    u32 state;
    struct {
      u8 active;
      u8 migrator;
      u16 seq;
    };
 };

πŸŽ€ Members πŸŽ€

  • state β€” the combined version of the state β€” and heads up, it's only used for the atomic read/cmpxchg function πŸ’… then there's the anon struct: that's the split version of the state, and you only use the struct members to update information so you stay independent of endianness πŸ‘‘
  • {unnamed_struct} β€” anonymous, mysterious, iconic, no name needed 🧚
  • active β€” contains each mask bit of the active children 🌈
  • migrator β€” contains the mask of the child which is migrator πŸ‘‘
  • seq β€” the sequence counter, and it needs to be increased whenever an update to the tmigr_state is done ⭐ because it prevents a race when updates in the child groups get propagated in a changed order 😭 the detailed info about that whole scenario is given in the documentation at the begin of timer_migration.c β€” go read it, iykyk πŸ“–

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./kernel/time/timer_migration.h plus the whole friend group: struct tmigr_hierarchy(9), struct tmigr_event(9), struct tmigr_group(9), and struct tmigr_cpu(9) πŸ’–


fr fr that's the whole page β€” every member, every warning, every cross-reference accounted for πŸ™ˆ

k bye bestie, this one's a wrap πŸ’œ from ./kernel/time, dated October 2026 πŸŽ€ slay ✨

πŸ“¦ where this page comes from