Skip to content

Commit 11083fc

Browse files
peter-mitsiskartben
authored andcommitted
kernel: Initialize kheap spinlock
Initializes the kheap spinlock when the kheap is initialized. Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
1 parent 3a66b38 commit 11083fc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/kheap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
void k_heap_init(struct k_heap *heap, void *mem, size_t bytes)
1616
{
1717
z_waitq_init(&heap->wait_q);
18+
heap->lock = (struct k_spinlock) {};
1819
sys_heap_init(&heap->heap, mem, bytes);
1920

2021
SYS_PORT_TRACING_OBJ_INIT(k_heap, heap);

0 commit comments

Comments
 (0)