wait_ops_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… wait_ops_state(9) πŸ’…

okay bestie, welcome to the Kernel API Manual page for wait_ops_state β€” the function whose whole personality is waiting for an ops state to end. Yes, literally. πŸŒ€


🌸 NAME 🌸

wait_ops_state β€” Busy-wait the specified ops state to end.

✨ SYNOPSIS ✨

void wait_ops_state (struct task_struct *p , unsigned long opss );

πŸŽ€ ARGUMENTS πŸŽ€

  • p β€” target task, aka the one we’re watching πŸ‘€
  • opss β€” state to wait the end of, periodt.

πŸ’– DESCRIPTION πŸ’–

okay so wait_ops_state() busy-waits for p to transition out of opss. That’s the whole move. 🫢

This can only be used when the state part of opss is SCX_QUEUEING or SCX_DISPATCHING. Not optional, bestie β€” that’s the rule. ⚠️

This function also has load_acquire semantics to ensure that the caller can see the updates made in the enqueueing and dispatching paths. So yeah, that load_acquire bit is doing its thing. ✨

πŸ”₯ SEE ALSO πŸ”₯

the kernel file ./kernel/sched/ext/ext.c says go look at:


made with πŸ’– by ./kernel/sched/ext, stamped October 2026, and filed under wait_ops_state(9) β€” bye bestie! πŸ’…

πŸ“¦ where this page comes from