STRUCT VIORTC_CLASS(9)
π struct viortc_class(9) π
okay so bestie, welcome to the struct viortc_class(9) page from the Kernel API Manual β yes, the whole manual, and yes, this one lil struct is the main character today π
β¨ NAME β¨
struct viortc_class β the RTC class wrapper, and honestly it's giving "small but crucial" π
πΈ SYNOPSIS πΈ
struct viortc_class {
struct viortc_dev *viortc;
struct rtc_device *rtc;
u16 vio_clk_id;
bool stopped;
};
no cap, that's the whole thing. four fields. four. and every single one of them is doing something π
π¦ Members π¦
viortcβ the virtio_rtc device data, aka where the virtio side of the story lives π«Άrtcβ the RTC device. yep, the actual real-time-clock device, iconic βvio_clk_idβ the virtio_rtc clock id. it's au16, she's little, she's fierce πstoppedβ whether RTC ops are disallowed or not π heads up bestie: access to this is protected byrtc_lock, so like, don't just vibe in there without the lock, fr fr π₯
ngl, take the locking note seriously β the manpage says access is protected by rtc_lock, and we are not out here freelancing π
π SEE ALSO π
kernel file ./drivers/virtio/virtio_rtc_class.c β go read the source, iykyk π
and the whole friend group, all (9): viortc_class_get_locked(9), viortc_class_read_time(9), viortc_class_read_alarm(9), viortc_class_set_alarm(9), viortc_class_alarm_irq_enable(9), viortc_class_alarm(9), viortc_class_stop(9), viortc_class_register(9), viortc_class_init(9) π¦
that's the page!! sending u off with a lil sign-off from ./drivers/virtio, dated October 2026 β go be a main character in the virtio_rtc code bestie, slay π
πβ¨
π¦ 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