Skip to content

Add timespec, Nanosleep(), ClockGettime() and syscall constants#6

Open
Zapaxe wants to merge 1 commit into
rux-lang:devfrom
Zapaxe:main
Open

Add timespec, Nanosleep(), ClockGettime() and syscall constants#6
Zapaxe wants to merge 1 commit into
rux-lang:devfrom
Zapaxe:main

Conversation

@Zapaxe
Copy link
Copy Markdown

@Zapaxe Zapaxe commented May 31, 2026

Summary

No timespec struct or typed wrappers existed for nanosleep/clock_gettime syscalls.

Error

The raw Syscall2 wrapper with uint64 args prevented the compiler from tracking memory writes through pointer arguments.

Fix

Added timespec struct, typed extern declarations for __rux_linux_nanosleep and __rux_linux_clock_gettime, and Nanosleep/ClockGettime wrapper functions using *timespec pointers. Also added SYS_NANOSLEEP (35), SYS_TIME (201), and SYS_CLOCK_GETTIME (228) constants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant