STRUCT SW_SYNC_GET_DEADLINE(9)
π struct sw_sync_get_deadline(9) β from the Kernel API Manual, bestie β¨
okay so picture this: you're deep in the kernel docs, section 9, and you land on this little cutie. it's giving "small struct, big main character energy" and honestly? we're obsessed. let's get into it π
πΈ NAME πΈ
struct sw_sync_get_deadline β literally just here to get the deadline hint of a sw_sync fence. that's the whole vibe. no cap. π¦
β¨ SYNOPSIS β¨
struct sw_sync_get_deadline {
__u64 deadline_ns;
__u32 pad;
__s32 fence_fd;
};
look at her. iconic. π
π«Ά Members π«Ά
deadline_nsβ the absolute time of the deadline. like, the actual timestamp, not a "in 5 minutes" kinda deal. β°padβ must be zero. zero. zilch. nothing. it's padding, she's just vibing there being zero bestie πfence_fdβ the sw_sync fence fd (in). that's your input, the fence you're asking about π₯
π Description π
so what does it do? it returns the earliest deadline set on the fence. earliest, okay? not all of them, not the latest β the earliest one. main character deadline only π
and the timebase for the deadline is CLOCK_MONOTONIC (same as vblank). so when you're reading that number, just know that's the clock it's measured against, iykyk π°οΈ
π¨ important though: if there is no deadline set on the fence, this ioctl will return -ENOENT. so like, bestie, be ready for that. don't say i didn't warn you π
π SEE ALSO π
- Kernel file
./drivers/dma-buf/sw_sync.cβ the source, the origin, the blueprint π« sync_timeline_create(9)sync_timeline_signal(9)sync_pt_create(9)
go read those next, fr fr π
and that's the whole page, bestie! π this little gem lives under ./drivers/dma-buf and it's dated October 2026 β so mark your calendars, struct sw_sync_get_deadline(9) said see you then π
β¨π§ββοΈ
π¦ 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