pr_flush(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pr_flush(9) β€” like, the kernel API manual page, bestie 🫢

okay so this is pr_flush(9) from the Kernel API Manual (yes, the whole manual is called that, we love a self-titled moment πŸ‘‘). Buckle up, it's giving "wait for your slow friends to catch up" energy and honestly? relatable 😭


✨ NAME ✨

pr_flush β€” wait for the printing threads to catch up. that's it. that's the whole vibe. no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

bool pr_flush (int timeout_ms , bool reset_on_progress );

look at her. two args, returns a bool, absolutely iconic ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • timeout_ms β€” the maximum time to wait, measured in ms. your patience budget, basically ⏳
  • reset_on_progress β€” if this one is true, the timeout gets reset every time any printer is spotted making some forward progress πŸ‘€ like a little "oh wait, they're moving, okay, new timer" situation πŸ”₯

🌸 DESCRIPTION 🌸

so here's the tea β˜•:

a value of 0 for timeout_ms means no waiting will occur β€” zero patience, immediate exit, ghosting behavior fr fr πŸ’€

a value of -1 represents infinite waiting β€” she will wait forever, main character commitment energy πŸ‘‘

and if reset_on_progress is true, the timeout will be reset whenever any printer has been seen to make some forward progress. lowkey generous of her ngl 🫢


🧚 CONTEXT 🧚

Process context. she may sleep while acquiring the console lock 😴 like, actual sleeping, not "pretending to be busy" sleeping. respect the nap πŸ’œ


⭐ RETURN ⭐

returns true if all usable printers are caught up. slay. that's the goal. that's the whole point. periodt πŸ’…βœ¨


πŸ”₯ SEE ALSO πŸ”₯

okay this list is LONG but we do not skip, we do not summarize, we list every single one because that's the rule and we're nothing if not thorough πŸŽ€ all of these live in the kernel file ./kernel/printk/printk.c (well, the section header says ./kernel/printk, and it's all printk business, iykyk):

every single one. we ate and left no crumbs πŸ“


πŸ’‘ friendly reminder bestie: 0 = no wait, -1 = forever, and reset_on_progress = the timer keeps getting a second chance whenever progress happens. don't forget or you'll be debugging at 3am 😭

and that's the page!! πŸ¦‹ this little slice of kernel lore comes to you from ./kernel/printk, dated October 2026 β€” mwah, go read some printk source, ily, bye πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from