STRUCT FW_CDEV_GET_CYCLE_TIMER2(9)
π struct fw_cdev_get_cycle_timer2(9) π
okay so welcome to the Kernel API Manual, bestie β this page is literally all about struct fw_cdev_get_cycle_timer2, and no cap it's a whole vibe. let's get into it π
β¨ NAME β¨
struct fw_cdev_get_cycle_timer2 β read cycle timer register πΈ that's the whole job, she's a reader not a fighter
π¦ SYNOPSIS π¦
struct fw_cdev_get_cycle_timer2 {
__s64 tv_sec;
__s32 tv_nsec;
__s32 clk_id;
__u32 cycle_timer;
};
lowkey obsessed with how tidy that is. four fields, zero drama. β¨
π MEMBERS π
tv_secβ system time, in seconds. the big number, the main character πtv_nsecβ system time, sub-seconds part, in nanoseconds. she's the tiny little detail that still matters, don't sleep on her π«Άclk_idβ this one's an input parameter, bestie: the clock you wanna pull the system time from πcycle_timerβ the Cycle Time register contents, just sitting there being iconic π
π DESCRIPTION π
So the FW_CDEV_IOC_GET_CYCLE_TIMER2 ioctl does two things at once, and honestly? multitasking queen. it reads the isochronous cycle timer and it reads the system clock. why does that matter, you ask? because it lets you correlate the reception time of isochronous packets with system time. iykyk β
clk_id is where you pick your clock, like with POSIX's clock_gettime function. the supported clk_id values are, fr fr:
- POSIX's
CLOCK_REALTIME - POSIX's
CLOCK_MONOTONIC - Linux's
CLOCK_MONOTONIC_RAW
that's the list, don't try to sneak in anything else π
And cycle_timer? it's made of three little slices, all in host byte order:
- 7 bits β
cycleSeconds - 13 bits β
cycleCount - 12 bits β
cycleOffset
cf. the Cycle Time register per IEEE 1394, or the Isochronous Cycle Timer register per OHCI-1394. π yes those are two different spec names for basically the same vibe, that's just how it is.
π SEE ALSO π
Kernel file ./include/uapi/linux/firewire-cdev.h, plus this whole friend group right here β she runs with a crowd π§:
struct fw_cdev_event_common(9)struct fw_cdev_event_bus_reset(9)struct fw_cdev_event_response(9)struct fw_cdev_event_response2(9)struct fw_cdev_event_request(9)struct fw_cdev_event_request2(9)struct fw_cdev_event_request3(9)struct fw_cdev_event_iso_interrupt(9)struct fw_cdev_event_iso_interrupt_mc(9)struct fw_cdev_event_iso_resource(9)struct fw_cdev_event_phy_packet(9)struct fw_cdev_event_phy_packet2(9)union fw_cdev_event(9)struct fw_cdev_get_info(9)struct fw_cdev_send_request(9)struct fw_cdev_send_response(9)struct fw_cdev_allocate(9)struct fw_cdev_deallocate(9)struct fw_cdev_initiate_bus_reset(9)struct fw_cdev_add_descriptor(9)struct fw_cdev_remove_descriptor(9)struct fw_cdev_create_iso_context(9)struct fw_cdev_set_iso_channels(9)struct fw_cdev_iso_packet(9)struct fw_cdev_queue_iso(9)struct fw_cdev_start_iso(9)struct fw_cdev_stop_iso(9)struct fw_cdev_flush_iso(9)struct fw_cdev_get_cycle_timer(9)struct fw_cdev_allocate_iso_resource(9)struct fw_cdev_send_stream_packet(9)struct fw_cdev_send_phy_packet(9)struct fw_cdev_receive_phy_packets(9)
π and that's the whole page bestie, every last flag and field accounted for, no skips, no gaps. slay.
okay so this lil diva lives at ./include/uapi/linux, and this edition is dated October 2026 β so like, mark your calendar bestie ποΈβ¨ periodt, that's the sign-off, 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