get_old_timespec32(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– get_old_timespec32 πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” yes that's the manual name, we're in the kernel docs section, put your seatbelt on πŸŽ€

This one is a tiny little function with a very specific job and honestly it's giving "quiet kid in the back of the class who's actually a genius." Let's get into it.


✨ NAME ✨

get_old_timespec32 β€” the way to pull a user's old-format time value into kernel space. literally just that. no cap. πŸ•


🌸 SYNOPSIS 🌸

int get_old_timespec32 (struct timespec64 *ts , const void __user *uts );

That's the whole flex. Two args, one int coming back at you. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ts β€” the destination struct timespec64. this is where the good stuff lands, it's the main character of the operation ✨
  • uts β€” the user's old-format time value, and it's a struct old_timespec32. note the __user on the pointer type β€” yeah, that one. treat it with respect πŸ™ˆ

🧚 DESCRIPTION 🧚

So what does it actually do? It handles the X86_X32_ABI compatibility conversion. that's it. that's the whole description. iconic brevity honestly πŸ‘‘

Translation for the besties: you've got an old-format time value sitting over in user space, and you need it in kernel space in the new-format struct timespec64 shape. This is the little compatibility bridge that makes that happen on X86_X32_ABI. fr fr, it's a converter. 🫢


⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • a negative errno on error 😭

that's it, that's the contract. check your return value, bestie, always πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

Up next on the playlist, we got the whole Kernel file ./kernel/time/time.c crew, and here's the full lineup β€” no skips, no shuffling, we're listening to the whole album 🌈

yeah that's twenty-five of them. not me counting. i counted. πŸ“

also peep put_old_timespec32(9) down there β€” that's this function's sibling, the reverse direction. cute lil family πŸ’œ

and that's the page!! πŸ’–

shoutout to the source β€” this one lives under ./kernel/time β€” and it's dated October 2026, so mark your calendars bestie πŸ“…βœ¨ go forth and convert your timestamps responsibly, ily, bye πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from