Platform Subsystem
The lowest-level system abstraction layer bridging the unified C++ codebase to the NeolyxOS kernel.
Core Abstractions
Thread Pools
Task scheduling, worker threading, atomic primitives, and synchronization primitives across the engine.
File IO
Platform-independent file system operations wrapping POSIX read/write descriptors securely.
Shared Memory (SHM)
Managing zero-copy memory mapping for fast IPC between the GPU compositor and Tab WebContents.
Event Loops
High-performance epoll/kqueue message pumping powering ZepraScript execution and network callbacks.
Time & Clocks
Monotonic timers, high-resolution performance counters for `performance.now()`, and timezones.
Power Management
OS hooks for sleep/wake telemetry, thermal throttling adaptation, and background tab freezing.
NeolyxOS Integration
┌────────────────────────────────────────────────────────┐
│ ZepraBrowser Core │
│ (webCore / ZepraScript / networking / media) │
└───────────────────────────┬────────────────────────────┘
│ #include <platform/...>
┌───────────────────────────▼────────────────────────────┐
│ Platform Abstraction API │
│ Thread::Create() | File::Open() | SharedMem::Map() │
└──────────────┬─────────────────────────────┬───────────┘
│ │
#ifdef OS_NEOLYX #ifdef OS_LINUX
▼ ▼
┌────────────────────────────┐ ┌───────────────────────────┐
│ Neolyx Specific Backends │ │ POSIX/Linux Backends │
│ nx_thread_spawn() │ │ pthread_create() │
│ nx_shm_alloc() │ │ shmget() / mmap() │
└──────┬─────────────────────┘ └─────┬─────────────────────┘
│ │
▼ ▼
┌────────────────────────────────────────────────────────┐
│ Host Kernel │
└────────────────────────────────────────────────────────┘