Skip to content

k_mem_slab + k_fifo/k_lifo (one allocator/queue-primitives PR) #46

@swoisz

Description

@swoisz

Promoted from the Not Planned table by the next-features ranking; together they unblock net_buf if comms-stack porting materializes.

k_mem_slab — a consumer pattern is now identified: Zephyr's I2S API takes k_mem_slab pointers for RX/TX block pools, making it a hard prerequisite for any Zephyr-shaped audio path. Also half of the net_buf dependency. Free list + existing blocking machinery; k_mem_slab_alloc(K_NO_WAIT) is ISR-safe by design.

k_queuek_fifo/k_lifo — pervasive in upstream code; almost any ported subsystem touches k_fifo. Builds on sys_slist. Other half of the net_buf dependency.

Design requirement (non-negotiable): blocking paths (k_queue_get(K_FOREVER), k_mem_slab_alloc with timeout) must be built on the owned-state architecture proven by #41/#42 (caller-owned state + stack-resident waiter nodes + the reserved notification index — see zkernel_internal.h and the zkernel README design principle), NOT on raw FreeRTOS-backed waits, which re-enter the object-lifetime bug family (#18/#21/#22).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestzephyr-parityDivergence from upstream Zephyr API/semantics

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions