readx_poll_timeout(9)
π readx_poll_timeout π
okay so this is a Kernel API Manual page, and bestie, it's literally about polling an address over and over until a condition hits or you run out of time. no cap. β°
β¨ NAME β¨
readx_poll_timeout β periodically poll an address until a condition is met or a timeout occurs π
πΈ SYNOPSIS πΈ
readx_poll_timeout (op , addr , val , cond , sleep_us , timeout_us );
like, yes, that's the whole thing. six args. she's iconic. π
π¦ ARGUMENTS π¦
opβ the accessor function, aka the little guy who does the actual reading (it takesaddras its only argument, that's the whole vibe)addrβ the address you're polling, the main character of this whole operation πvalβ the variable where the value gets read into π«Άcondβ the break condition, the thing you're waiting for (usually involvesval, iykyk)sleep_usβ max time to sleep between reads, in us. and yes,0means tight-loops π please go read theusleep_rangefunction description for the details and limitations, fr fr, don't skip ittimeout_usβ the timeout, in us.0means never timeout, so like... she'll wait forever, no thoughts head empty π
π§ DESCRIPTION π§
so bestie, when it's available, you'll probably want to use one of the specialized macros defined below instead of this macro directly. that's the whole tea. ββ¨
β RETURN β
0 on success, and -ETIMEDOUT when the timeout hits. either way, the last read value at addr gets stored in val, so you're never left hanging with nothing. π
lowkey important warning: this must not be called from atomic context ifsleep_usortimeout_usare used. like, do not do that. π
π SEE ALSO π
- the kernel file
./include/linux/iopoll.hβ go look at it π poll_timeout_us(9)poll_timeout_us_atomic(9)read_poll_timeout(9)read_poll_timeout_atomic(9)readx_poll_timeout_atomic(9)
and that's the page, bestie! this one lives in ./include/linux, dated October 2026 β so mark your calendars, the kernel API manual is booked and busy. ππβ¨
π¦ 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