viortc_read(9)
π viortc_read(9) β like, the gen-z field guide to the Kernel API Manual, bestie π
okay so. picture this: you're deep in the kernel, you need a clock reading pulled out of a virtio_rtc device, and you do NOT wanna hand-roll the whole request yourself. enter viortc_read β it's literally the VIRTIO_RTC_REQ_READ wrapper. that's the whole vibe. it wraps, you read, everyone slays. β¨
β¨ NAME β¨
viortc_read β the VIRTIO_RTC_REQ_READ wrapper, no cap π«Ά
πΈ SYNOPSIS πΈ
int viortc_read (struct viortc_dev *viortc , u16 vio_clk_id , u64
*reading );
yep, that's the signature, character-for-character, don't @ me π
π¦ ARGUMENTS π¦
viortcβ the device data. like, which virtio_rtc device are we even talking to, bestie? this one. πvio_clk_idβ the virtio_rtc clock id,u16flavoured. it's giving "which clock tho" energy. β°readingβ the clock reading, in[ns]. nanoseconds, iconically. this is where the answer lands. π―
π CONTEXT π
Process context. that's it, that's the whole context section. no interrupt-drama, no atomic shenanigans, just process context and good vibes. π§
β RETURN β
Zero on success β¨ β and a negative error code otherwise π. that's the deal, fr fr.
π SEE ALSO π
okay this list is LONG and honestly kind of iconic, so buckle up, we're going down the whole rabbit hole together:
- Kernel file
./drivers/virtio/virtio_rtc_driver.cβ literally the source file, go read it, iykyk π struct viortc_vq(9)struct viortc_dev(9)struct viortc_msg(9)viortc_class_from_dev(9)viortc_alarms_supported(9)viortc_feed_vq(9)viortc_msg_init(9)viortc_msg_release(9)viortc_do_cb(9)viortc_requestq_hdlr(9)viortc_cb_requestq(9)viortc_alarmq_hdlr(9)viortc_cb_alarmq(9)viortc_get_resp_errno(9)viortc_msg_xfer(9)VIORTC_DECLARE_MSG_HDL_ONSTACK(9)VIORTC_MSG(9)VIORTC_MSG_INIT(9)VIORTC_MSG_WRITE(9)VIORTC_MSG_READ(9)viortc_read_cross(9)viortc_cfg(9)viortc_clock_cap(9)viortc_cross_cap(9)viortc_read_alarm(9)viortc_set_alarm(9)viortc_set_alarm_enabled(9)viortc_init_rtc_class_clock(9)viortc_init_ptp_clock(9)viortc_init_clock(9)viortc_clocks_deinit(9)viortc_clocks_init(9)viortc_populate_vq(9)viortc_alloc_vq_bufs(9)viortc_init_vqs(9)viortc_probe(9)viortc_remove(9)
like i said. LONG. but every single one of them is there, and that's on periodt. π π₯
π quick vibe check bestie: this one lives under./drivers/virtio, the manual page is dated October 2026, and it's filed asviortc_read(9). go forth and read some clocks, you absolute main character π«Άβ¨π
π¦ 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