mm/mempool: Initialize spinlock with spin_initialize

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-01-27 20:51:57 +08:00 committed by GUIDINGLI
parent 555c4fede3
commit be1c84c96a
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ int mempool_init(FAR struct mempool_s *pool, FAR const char *name)
kasan_poison(base, size); kasan_poison(base, size);
} }
pool->lock = 0; spin_initialize(&pool->lock, 0);
if (pool->wait && pool->expandsize == 0) if (pool->wait && pool->expandsize == 0)
{ {
nxsem_init(&pool->waitsem, 0, 0); nxsem_init(&pool->waitsem, 0, 0);