# UniversalisOS Stub Registry **Purpose:** Track all stub implementations in the codebase for future identification and removal. **Marker Convention:** `UOS-STUB--` (e.g., `UOS-STUB-T8-1.2h`) **Search Command:** ```bash grep -rn "UOS-STUB" kernel/src/ --include="*.c" --include="*.cpp" --include="*.h" ``` --- ## Active Stubs ### UOS-STUB-T8-1.2h — POSIX Process Management **Location:** `kernel/src/core/abi/uos_posix_abi.cpp` **Functions:** `task_fork()`, `task_waitpid()` **Reason:** POSIX fork/waitpid not yet implemented for musl personality **Added:** 2026-07-12 (T8-1.2g wiring) **Remove when:** T8-1.2h implements proper POSIX process management **Status:** ACTIVE ### UOS-STUB-T8-1.2b — POSIX ABI Memory Management Declarations **Location:** `kernel/src/core/mm.h` **Functions:** `mm_mmap()`, `mm_munmap()`, `mm_mprotect()`, `mm_madvise()`, `mm_mremap()` **Reason:** Declarations added for POSIX_SVC_* syscalls; implementations exist in mm.cpp but were not previously declared **Added:** 2026-07-12 (canonical commands fix) **Remove when:** T8-2.1 implements proper page-table-backed MM functions **Status:** ACTIVE --- ## Pre-existing Stubs (Not Tracked Here) The following stubs exist in the codebase but were not added by recent work: - `kernel/src/arch/armv7/uos_cmm.cpp` — PSP init stub (D-1.3) - `kernel/src/arch/riscv/guest_loader.cpp` — ELF parsing not implemented - `kernel/src/arch/aarch64/apple/main_apple.c` — SMP, hypervisor, platform driver stubs - `kernel/src/platform/drivers/driver.cpp` — Various interrupt handler stubs - `kernel/src/platform/drivers/usb.h` — x86 legacy handoff stub These are documented in their respective files and are not part of the UOS-STUB tracking system. --- ## How to Add a New Stub 1. Use the marker convention: `UOS-STUB--` 2. Add a comment block with: - Marker - Reason - Date added - Removal condition 3. Add an entry to this registry 4. Use the marker in any runtime messages: `[UOS-STUB--]` **Example:** ```c /* ============================================================================ * UOS-STUB: example_function * ---------------------------------------------------------------------------- * Marker: UOS-STUB-T9-1.1 * Reason: Example reason for the stub * Added: 2026-07-12 * Remove when: T9-1.1 implements the real function * ==========================================================================*/ void example_function(void) { uart_puts("[UOS-STUB-T9-1.1] example_function: not implemented\n"); } ``` --- ## How to Remove a Stub 1. Implement the real function 2. Remove the stub code 3. Remove the entry from this registry 4. Verify no references to the marker remain: ```bash grep -rn "UOS-STUB--" kernel/src/ ``` --- ## Verification To verify all stubs are properly marked: ```bash # Find all stub markers grep -rn "UOS-STUB" kernel/src/ --include="*.c" --include="*.cpp" --include="*.h" # Find unmarked stubs (should return nothing) grep -rn "not implemented\|stub" kernel/src/ --include="*.c" --include="*.cpp" --include="*.h" | grep -v "UOS-STUB" ```