kernel: Initialize kheap spinlock

Initializes the kheap spinlock when the kheap is initialized.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This commit is contained in:
Peter Mitsis 2025-01-30 12:18:56 -08:00 committed by Benjamin Cabé
commit 11083fc049

View file

@ -15,6 +15,7 @@
void k_heap_init(struct k_heap *heap, void *mem, size_t bytes)
{
z_waitq_init(&heap->wait_q);
heap->lock = (struct k_spinlock) {};
sys_heap_init(&heap->heap, mem, bytes);
SYS_PORT_TRACING_OBJ_INIT(k_heap, heap);