Files
SUB-OS/kernel/nt
subhobhai943andClaude Opus 4.8 cb7506f027 feat(kernel): NT-inspired Object Manager, dispatcher and IRQL
Take inspiration from the Windows NT Executive and add its most iconic
subsystem to SUB-OS: a typed, reference-counted object namespace.

- kernel/nt/ob.c + include/kernel/nt/ob.h (new):
  * Object Manager (Ob): typed objects (Directory/Event/Semaphore/Mutant) in a
    hierarchical named namespace rooted at "\", with NT-style deletion once
    handle_count and ref_count both reach zero (unless permanent).
  * Handle table (Io/Ob): NT-shaped non-zero 4-aligned HANDLEs into a 256-slot
    system table; open/reference/close with proper refcount transfer.
  * Dispatcher (Ke): set/reset/test events (auto- and manual-reset) and
    release/wait semaphores, poll-style.
  * Software IRQL: PASSIVE/APC/DISPATCH/HIGH with raise/lower semantics.
  * NTSTATUS result codes and NT_SUCCESS().
  * ob_init() seeds the standard namespace (\BaseNamedObjects, \Device,
    \ObjectTypes, \KernelObjects) plus a boot event and an I/O semaphore.
- Wired ob_init() into the [12/14] boot step; added kernel/nt/ob.c to CORE_SRCS.
- LazyBox: `objdir [\path]` walks the object namespace tree (WinObj-style);
  `ntobj` prints Ob statistics and runs a live dispatcher/handle/IRQL demo.

Verified live in the GUI terminal (screenshotted): 7 seeded objects
(5 directories, 1 event, 1 semaphore), auto-reset event signalling, handle
close reclaiming the object, and PASSIVE->DISPATCH->PASSIVE IRQL transitions.
Clean build on x86_64/aarch64/armv8i; 0 panics / 0 OOM.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fh5z6V7nGPbHvqVG5p4CXX
2026-08-25 20:23:07 +05:30
..