Commit Graph

12 Commits

Author SHA1 Message Date
Ashwin Naren
c07dd2140c implement hostname properly 2026-02-08 00:39:55 -08:00
Ashwin Naren
157c29104f formatting 2026-02-07 00:31:23 -08:00
Ashwin Naren
8046d746dd implement more of sys_power 2026-02-07 00:31:23 -08:00
Ashwin Naren
aa5a9c7b79 fix typos 2026-01-23 01:26:04 -08:00
Matthew Leach
35efecad76 process: split Task into Task (shared) and OwnedTask (local)
This commit refactors the core process representation to decouple
"Identity/Resources" from "Execution/Scheduling". Previously, a
monolithic `Task` struct wrapped in `Arc<SpinLock<>>` caused lock
contention during hot scheduling paths and conflated shared state with
CPU-local state.

The `Task` struct has been split into:

1. `Task` (Shared): Holds process-wide resources (VM, FileTable,
Credentials). Managed via `Arc` and internal fine-grained locking.

2. `OwnedTask` (Private): Holds execution state (Context, v_runtime,
signal mask). Strictly owned by a specific CPU (via the Scheduler) and
accessed lock-free.

Key changes:

* Scheduler:
  chedState` now owns tasks via `Box<OwnedTask>`.
  - Transitions between `run_queue` and `running_task` involve strictly
    moving ownership of the Box, ensuring pointer stability.
  - The EEVDF comparison logic now explicitly handles comparisons
    between the queued candidates and the currently running task (which is
    not in the queue).

* Current Task Access:
  - `current()` now returns a `CurrentTaskGuard` which:
    1. Disables preemption (preventing context switches while holding
       the reference).
    2. Performs a runtime borrow check (panic on double-mutable borrow).
    3. Dereferences a cached Per-CPU raw pointer for O(1) access.
2026-01-01 22:54:43 +00:00
ootinnyoo
fe4f3103dc implement linux-like process capabilities 2025-12-29 13:53:02 -08:00
Ashwin Naren
35a6caa541 Implement sys_sysinfo (#71) 2025-12-20 15:42:08 -08:00
Ashwin Naren
f63ad250f4 implement restarting 2025-12-15 21:22:53 +00:00
Matthew Leach
8038a6c4e2 syscalls: sys_getrand: implement
Implement sys_getrand
2025-11-28 21:24:37 +00:00
Matthew Leach
28980c6725 uname: fudge the version of the kernel for libc
libc bringup checks the version of the kernel and it appears as though
it's not happy with `0.1.0`:

```
FATAL: kernel too old
```

For now, fudge the version to keep libc happy.
2025-11-28 20:09:05 +00:00
Ashwin Naren
de76e243a2 properly shutdown system 2025-11-28 20:02:12 +00:00
Matthew Leach
ca6fdd0da5 Initial Commit
Initial commit of arm64 bring-up code, kernel core (libkernel) and build
infrastructure.
2025-11-16 20:15:01 +00:00