Skip to content

Commit

Permalink
mm/mempool: Initialize spinlock with spin_initialize
Browse files Browse the repository at this point in the history
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
  • Loading branch information
xiaoxiang781216 authored and GUIDINGLI committed Feb 2, 2023
1 parent 555c4fe commit be1c84c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/mempool/mempool.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ int mempool_init(FAR struct mempool_s *pool, FAR const char *name)
kasan_poison(base, size);
}

pool->lock = 0;
spin_initialize(&pool->lock, 0);
if (pool->wait && pool->expandsize == 0)
{
nxsem_init(&pool->waitsem, 0, 0);
Expand Down

0 comments on commit be1c84c

Please sign in to comment.