docs: fix two review findings from the reorg audit
An adversarial review of the reorg surfaced two doc inaccuracies:
- timers.md: a `time` code example still did `@import("runtime").time`, which
no longer compiles — the runtime aggregator was deleted. Now `@import("time")`.
(Reorg regression: the sweep rewrote `runtime.x` member access but not the
`@import("runtime")` form inside a fenced code block.)
- sysv.md: `callconv(system.kernel_abi)` named a non-existent `system` module;
`kernel_abi` lives in the boot-handoff contract (system/boot-handoff.zig),
imported as `boot_handoff`. Now `boot_handoff.kernel_abi`. (Pre-existing bug —
"system" was the file-path prefix mistaken for a module namespace — found and
fixed opportunistically.)
This commit is contained in:
+2
-2
@@ -59,9 +59,9 @@ danos's two binaries default to different conventions:
|
|||||||
When the loader jumps to the kernel passing the `BootInformation` pointer, both sides have
|
When the loader jumps to the kernel passing the `BootInformation` pointer, both sides have
|
||||||
to agree *which register that pointer lands in*. Left to their defaults, the loader
|
to agree *which register that pointer lands in*. Left to their defaults, the loader
|
||||||
would place it in RCX while the kernel looked in RDI — and the kernel would read
|
would place it in RCX while the kernel looked in RDI — and the kernel would read
|
||||||
garbage. So both sides reference the same `system.kernel_abi` (SysV): the loader's
|
garbage. So both sides reference the same `boot_handoff.kernel_abi` (SysV): the loader's
|
||||||
function-pointer type and the kernel's `_start` both carry
|
function-pointer type and the kernel's `_start` both carry
|
||||||
`callconv(system.kernel_abi)`, and the pointer reliably arrives in RDI. That is the
|
`callconv(boot_handoff.kernel_abi)`, and the pointer reliably arrives in RDI. That is the
|
||||||
whole reason `kernel_abi` lives in the shared contract — see [efi.md](efi.md) for
|
whole reason `kernel_abi` lives in the shared contract — see [efi.md](efi.md) for
|
||||||
the handoff it governs.
|
the handoff it governs.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -68,7 +68,7 @@ Applications don't call the syscalls directly; they use `time`
|
|||||||
front door, not new mechanism.
|
front door, not new mechanism.
|
||||||
|
|
||||||
```zig
|
```zig
|
||||||
const time = @import("runtime").time;
|
const time = @import("time");
|
||||||
|
|
||||||
const start = time.now(); // Instant — monotonic
|
const start = time.now(); // Instant — monotonic
|
||||||
doWork();
|
doWork();
|
||||||
|
|||||||
Reference in New Issue
Block a user