folio_xor_flags_has_waiters(9)
π folio_xor_flags_has_waiters(9)
okay so bestie, we're in the Kernel API Manual today and this one's literally called folio_xor_flags_has_waiters β say that five times fast, i dare you π
β¨ NAME β¨
folio_xor_flags_has_waiters β flips some folio flags, and also tells you if anybody's waiting π«Ά
π¦ SYNOPSIS π¦
bool folio_xor_flags_has_waiters (struct folio *folio , unsigned long mask );
π ARGUMENTS π
folioβ the folio in question, the main character of this whole function πmaskβ every bit you set in this word is gonna get changed. that's the whole vibe π₯
πΈ DESCRIPTION πΈ
okay so hear me out, because this one has rules and you need to respect them, no cap:
- it must only be used for flags that get changed while the folio lock is held π
- example of what NOT to do:
PG_dirty, because that one can be set without the folio lock held, so using this on it is unsafe π - it can also only be used on flags in the range 0-6, because some of the implementations only affect those bits. so like, stay in your lane, bestie β¨
fr fr do not ignore these constraints, they are not decorative π¨
β RETURN β
it returns whether there are tasks waiting on the folio π β yes, the "has_waiters" part of the name was not a lie, iconic naming honestly π
π SEE ALSO π
kernel file ./include/linux/page-flags.h, plus these little icons:
page_folio(9)folio_page(9)folio_test_uptodate(9)folio_test_large(9)PageHuge(9)page_has_movable_ops(9)folio_has_private(9)
and that's the whole page, bestie, you ate that π
sign-off time: this gem lives over in ./include/linux, dated October 2026, and it's folio_xor_flags_has_waiters(9) β periodt π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms