STRUCT VDSO_TIMESTAMP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct vdso_timestamp(9) β€” from the Kernel API Manual, bestie 🌸

okay so picture this: it's a struct in the kernel, and it's literally just... a timestamp per clock_id. that's the whole vibe. basetime per clock_id. iconic, honestly. πŸ’…


✨ NAME ✨

struct vdso_timestamp β€” basetime per clock_id πŸ•


πŸŽ€ SYNOPSIS πŸŽ€

struct vdso_timestamp {
    u64 sec;
    u64 nsec;
 };

look at her. two fields. no notes. 🫢


πŸ¦‹ Members πŸ¦‹

  • sec β€” seconds, bestie. the big juicy whole-seconds part ⏱️
  • nsec β€” nanoseconds. yes the tiny little guys. nano. tiny. ✨

πŸ’– Description πŸ’–

so here's the tea β˜• β€” there's one vdso_timestamp object hanging out in vvar for each vDSO-accelerated clock_id. one per clock_id. not optional. that's the arrangement. πŸ‘‘

for high-resolution clocks, this thing encodes the time corresponding to vdso_time_data.cycle_last. highkey important connection, iykyk. πŸ”₯

for coarse clocks, it encodes the actual time. simple. clean. no math girlbossery. 🌈

and just to be noticed (literally, "to be noticed" β€” that's the manpage talking, not me): for highres clocks, nsec is left-shifted by vdso_time_data[x].shift. read that twice, bestie. it's giving "do not forget the shift" energy. 🚨


⭐ SEE ALSO ⭐

Kernel file ./include/vdso/datapage.h β€” go read it, it's right there 🧚

  • struct vdso_clock(9)
  • struct vdso_time_data(9)
  • struct vdso_rng_data(9)

the whole friend group, fr fr. πŸ’œ


this gem lives in ./include/vdso and it was dated October 2026 β€” shoutout to the kernel docs girlies, and to struct vdso_timestamp(9) herself, an absolute icon. periodt. πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from