STRUCT SW_SYNC_GET_DEADLINE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 🌈

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