Repository navigation
SYS_CLOCK_REALTIME is deleted; its two callers format SYS_CLOCK_EPOCH - #945
Conversation
Both handlers read clock::utc_secs(); SYS_CLOCK_REALTIME only packed it into h:m:s, carrying nothing SYS_CLOCK_EPOCH does not. The syscall, its kernel arm, toyos_abi's clock_realtime and RealTime, and toyos's wrapper go. The compositor's taskbar clock formats clock_epoch() through toyos_wallclock::Civil, the tree's one calendar. wall_clock_now loses its "both answered or neither" assertion, which one syscall makes vacuous, and its realtime= print, which no host test read. No consumer outside the tree: ToyOS's std fork, the fork clones and ~/.cargo/git/checkouts name neither the number nor the function. Closes issues/sys-clock-realtime-is-now-a-format-of-sys-clock-epoch.md; the capability end state's list of machine facts drops the syscall.
Review of #945 at ab409f3 (base origin/main 979d4c5)Assessment. This is a clean deletion that moves work out of the kernel. ABI coherence. The whole chain is removed in one landing:
On the branch tree, Compositor semantics are unchanged.
Dependency. Issue edits.
Evidence and the T14. I read the logs at evidence QEMU aarch64
No host parser reads Findings
LAND |
|
Merge-queue run 38719410357 went red on |
What this changes
SYS_CLOCK_REALTIME(42), its kernel arm inkernel/src/syscall/dispatch.rs,toyos_abi::syscall::{SYS_CLOCK_REALTIME, clock_realtime, RealTime}andtoyos::system::{clock_realtime, RealTime}are deleted. The compositor's taskbar clock formatsclock_epoch()throughtoyos_wallclock::Civil(new path dependency on the existing no_std calendar crate).wall_clock_nowreads onlySYS_CLOCK_EPOCH: its "both syscalls answered or neither" assertion and itsrealtime=print go — the first is vacuous with one syscall, the second was read by no host test (virt_wall_clock_utcparseswall-clock: epoch=andwall-clock: std_epoch=).Why
Since the RTC-keeps-UTC ruling both handlers read
clock::utc_secs();SYS_CLOCK_REALTIMEonly packed it into h:m:s, carrying nothingSYS_CLOCK_EPOCHdoes not. The issue fixed the decision to delete it.Evidence
Logs: https://github.com/ToyOSOrg/evidence/tree/6fe2825e5cb3b01fc4f4efc37cf0a4783784331c/ab409f3e4 (
ci-host.log,build-only.log,guest.log,metal-readback.log). Revision: the tree committed asab409f3e4(all runs below were on that exact worktree content before committing), host macOS arm64.cargo run -- --ci host— exit 0, "Host: 86 step(s), all green".cargo run -- --build-only— exit 0; rebuilt both toyos sysroots against the changedtoyos-abi/toyos(std fork compiles without the deleted items) and the x86-64 image.cargo test --test toyos-build -- wall_clock the_compositor_drives_the_virtio_gpu— exit 0, 2 passed:virt_wall_clock_utc(AArch64 virt, runswall_clock_nowand checksepoch=andstd_epoch=against the RTC instant staged by the host:epoch=1993799667, 2s past the staged 2033-03-07T09:14:25— independent oracle) andthe_compositor_drives_the_virtio_gpu(x86-64 HeadlessVirtioGpu; the desktop including the taskbar status clock is drawn at two modes).wall_clock_now's x86-64 run is a member of the metal shared boot only (a QEMU filter refuses it). Staged withcargo test --test toyos-build -- --metal --metal-readback <dir> wall_clock_now(exit 2 = staged, no machine touched); not run.git grepof the tree, the fork clones beside the monorepo, the primary checkout'srust/libraryand~/.cargo/git/checkouts— no other user of the number or the function (only Miri's unrelatedRealTimein rust-upstream). libc's POSIXCLOCK_REALTIMEis a separate thing and already goes throughSYS_CLOCK_EPOCH.What is unsure
The compositor clock's pixels are not asserted by any test; the virtio-gpu smoke shows the taskbar path draws without fault, and the HH:MM derivation is
Civil::from_unix_secs, host-tested inlib/wallclock. Syscall number 42 is left unused, not renumbered.Anything a reader of
mainmust not missCloses
issues/sys-clock-realtime-is-now-a-format-of-sys-clock-epoch.md.issues/the-capability-end-state-is-twelve-answers.md's machine-facts list drops the syscall.issues/the-loader-does-only-what-must-precede-the-handover.mdstill namesSYS_CLOCK_REALTIMEand the probe'srealtime=in stage 1, which records what the landed PR #583 did; left as history.