⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module buffer

Module buffer 

Source
Expand description

Wayland Buffer and SHM Pool Management

Provides pixel buffer allocation backed by kernel-heap memory pools. Each WlShmPool owns a contiguous byte allocation from which individual WlBuffer objects are sub-allocated at arbitrary offsets. This mirrors the real Wayland wl_shm / wl_shm_pool / wl_buffer protocol objects.

Structs§

Buffer
Legacy buffer struct retained for surface.rs compatibility. New code should use WlBuffer + pool references.
WlBuffer
A buffer object referencing pixel data within a WlShmPool.
WlShmPool
A shared memory pool that backs one or more buffers.

Functions§

init_shm_pools
Initialize the SHM pool registry (called once during Wayland init).
register_pool
Register a new SHM pool.
unregister_pool
Remove a pool from the registry.
with_pool
Execute a closure with read-only access to a specific pool.
with_pool_mut
Execute a closure with mutable access to a specific pool.