pm_get_wakeup_count(9)
π€ pm_get_wakeup_count(9) π€
okay bestie, gather round, because we're diving into the Kernel API Manual and today's main character is pm_get_wakeup_count β yes she's from the kernel API manual, yes she's iconic, no we're not skipping her β¨
πΈ NAME πΈ
pm_get_wakeup_count β literally just reads the number of registered wakeup events for you. that's her whole thing. that's the assignment and she ate π
π¦ SYNOPSIS π¦
bool pm_get_wakeup_count (unsigned int *count , bool block );
π ARGUMENTS π
countβ the address where you want the value stored. like, hand her a spot in memory and she'll put the number there, no cap π«Άblockβ whether or not to block. yes that's the whole description, she's a simple girlie π
β¨ DESCRIPTION β¨
so here's the tea: she stores the number of registered wakeup events at the address in count. simple, clean, gorgeous π
and if block is set? she will block until the current number of wakeup events being processed is zero. like she's not moving until the vibes are settled, periodt β
she returns 'false' if the current number of wakeup events being processed is nonzero. otherwise she returns 'true'. that's it, that's the whole vibe check π
π₯ SEE ALSO π₯
the whole friend group, fr fr β plus the kernel file ./drivers/base/power/wakeup.c:
wakeup_source_create(9)wakeup_source_destroy(9)wakeup_source_add(9)wakeup_source_remove(9)wakeup_source_register(9)wakeup_source_unregister(9)wakeup_sources_read_lock(9)wakeup_sources_read_unlock(9)wakeup_sources_walk_start(9)wakeup_sources_walk_next(9)device_wakeup_attach(9)device_wakeup_enable(9)device_wakeup_attach_irq(9)device_wakeup_detach_irq(9)device_wakeup_arm_wake_irqs(9)device_wakeup_disarm_wake_irqs(9)device_wakeup_detach(9)device_wakeup_disable(9)device_set_wakeup_capable(9)device_set_wakeup_enable(9)wakeup_source_not_usable(9)wakeup_source_activate(9)wakeup_source_report_event(9)__pm_stay_awake(9)pm_stay_awake(9)wakeup_source_deactivate(9)__pm_relax(9)pm_relax(9)pm_wakeup_timer_fn(9)pm_wakeup_ws_event(9)pm_wakeup_dev_event(9)pm_wakeup_pending(9)pm_save_wakeup_count(9)pm_wakep_autosleep_enabled(9)print_wakeup_source_stats(9)wakeup_sources_stats_seq_show(9)bpf_wakeup_sources_read_lock(9)bpf_wakeup_sources_read_unlock(9)bpf_wakeup_sources_get_head(9)
and that's the whole page, bestie!! π this lil gem lives under ./drivers/base/power and the version you're reading is dated October 2026 β go forth and wake things up responsibly, 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