]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
POSIX Tiers 1-3: signals, brk/sbrk, nanosleep, raw TTY, O_CLOEXEC, PMM refcount,...
authorTulio A M Mendes <[email protected]>
Tue, 10 Feb 2026 03:42:56 +0000 (00:42 -0300)
committerTulio A M Mendes <[email protected]>
Tue, 10 Feb 2026 03:42:56 +0000 (00:42 -0300)
commite9527b35d81f3e9caae4171af4c987cb3160c8fb
treeaaa5c184f415c0f17dcf34985d220701b464e79f
parenteed0331f44e9bdf22f1dfe5806bc8254e52b52b5
POSIX Tiers 1-3: signals, brk/sbrk, nanosleep, raw TTY, O_CLOEXEC, PMM refcount, CoW fork, mmap/munmap, procfs, slab allocator, O(1) scheduler, PCI enumeration, VBE framebuffer

Tier 1:
- Signal characters (Ctrl+C/Z/\ -> SIGINT/SIGTSTP/SIGQUIT) in TTY/PTY
- brk/sbrk syscall with ELF loader heap break support
- nanosleep/clock_gettime syscalls (tick-based)
- Raw TTY mode (non-canonical) + ISIG flag + TIOCGWINSZ/TIOCSWINSZ

Tier 2:
- O_CLOEXEC/FD_CLOEXEC: per-FD flags, fcntl F_GETFD/F_SETFD, close on execve
- PMM ref-counting (uint16_t per-frame, atomic ops)
- Copy-on-Write fork: PTE bit 9 COW marker, page fault handler, vmm_as_clone_user_cow
- mmap/munmap: anonymous MAP_PRIVATE, per-process VMA tracker (32 slots)
- /proc filesystem: /proc/self/status, /proc/uptime, /proc/meminfo

Tier 3:
- Slab allocator: free-list-in-place, per-cache spinlock, auto-grow
- O(1) scheduler: 32-priority bitmap + active/expired runqueue swap
- PCI enumeration: bus/slot/func scan, vendor/device/class/BAR/IRQ
- VBE framebuffer: multiboot2 tag parsing, kernel VA mapping, pixel ops

All changes pass: make clean && make, cppcheck --enable=warning,performance,portability, and QEMU smoke test (10s stable boot, all init tests pass).
28 files changed:
docs/SUPPLEMENTARY_ANALYSIS.md [new file with mode: 0644]
include/arch/x86/multiboot2.h
include/elf.h
include/kernel/boot_info.h
include/pci.h [new file with mode: 0644]
include/pmm.h
include/process.h
include/procfs.h [new file with mode: 0644]
include/slab.h [new file with mode: 0644]
include/syscall.h
include/tty.h
include/vbe.h [new file with mode: 0644]
include/vmm.h
src/arch/x86/arch_early_setup.c
src/arch/x86/arch_platform.c
src/arch/x86/idt.c
src/arch/x86/vmm.c
src/drivers/pci.c [new file with mode: 0644]
src/drivers/vbe.c [new file with mode: 0644]
src/kernel/elf.c
src/kernel/init.c
src/kernel/procfs.c [new file with mode: 0644]
src/kernel/pty.c
src/kernel/scheduler.c
src/kernel/syscall.c
src/kernel/tty.c
src/mm/pmm.c
src/mm/slab.c [new file with mode: 0644]