See also: Home, Build Guide, Kernel Documentation
This section documents Valecium userspace components by source directory. Each page below maps to a directory under usr/ and summarizes its purpose and role in runtime testing.
Userspace Components
-
libmath.ad — Shared math library for userspace (libmath.so)
-
sh.ad — Interactive shell userspace program
-
selftest.ad — Freestanding syscall self-test program
Component Details
libmath (usr/libmath/)
A dynamically-linked shared math library (libmath.so) providing:
-
Integer arithmetic (add, subtract, multiply, divide, modulo)
-
Trigonometric functions via Taylor series (sin, cos, tan)
-
Exponential and logarithmic functions (exp, log, log10)
-
Power and square root (pow, sqrt)
-
Rounding (floor, ceil, round)
-
Min/max and floating-point modulo
-
Init entry point:
libmath_init()
Shell (usr/sh/)
An interactive shell with:
-
Built-in commands:
exit [code],cd [dir],help -
Variable assignment (
VAR=value) and expansion ($VAR) -
PATH-based executable lookup via
$PATH -
I/O redirection:
<,>,>> -
Pipeline support (
|) with fork/exec/pipe -
&&chaining -
SIGINT handling
Selftest (usr/selftest/)
A pure-assembly, freestanding binary (no libc) that validates:
-
Syscall trap path (write to stdout, blocking read, open, close, exit)
-
FAT directory iteration via
SYS_OPENon/ -
Context switching and process lifecycle
Navigation Notes
-
Start with selftest.ad if you are validating syscall and context-switch behavior.
-
See kernel/syscall.ad for kernel-side syscall handling details.
-
For build integration, see building.ad and
usr/SConscript.