eventfd_signal_mask(9)
π eventfd_signal_mask(9) β the kernel API glow-up π
okay so bestie, you're reading eventfd_signal_mask(9) β yes that's the manual name, we're being official today β and it's literally just about bumping a counter and yelling "overflow!!" at poll(2). let's get into it β¨
πΈ SYNOPSIS πΈ
void eventfd_signal_mask (struct eventfd_ctx *ctx , __poll_t mask );
that's the whole vibe. two args, no return, no drama π
π«Ά ARGUMENTS π«Ά
ctxβ[in]a pointer to the eventfd context, aka the little handle on the thing you're counting. give it here πmaskβ[in]the poll mask. yes, it's just called "poll mask", that's the whole description, no notes π
π₯ DESCRIPTION π₯
okay so here's the tea π β this function is supposed to be called by the kernel in code paths that do not allow sleeping. like, no napping allowed, we're in a no-sleep zone, keep it moving πββοΈ
inside, we let the counter go all the way up to ULLONG_MAX. yes, the big one. max it out, why not π
and when it hits that? we flag it as an overflow condition by returning EPOLLERR to poll(2). so poll(2) gets the messy news. that's the signal, that's the drama, that's the whole point π
not me letting the counter hitULLONG_MAXand then tellingpoll(2)about it. iconic behavior honestly π
π SEE ALSO π
go look at the kernel file ./fs/eventfd.c β it's all in there, iykyk π
eventfd_ctx_put(9)eventfd_ctx_remove_wait_queue(9)eventfd_fget(9)eventfd_ctx_fdget(9)eventfd_ctx_fileget(9)
β sign-off β
and that's the page, bestie π¦ this one lives over in ./fs and it's dated October 2026 β so like, future icon behavior π go touch some kernel code, mwah π
β¨
π¦ 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