mm/mempool: Initialize spinlock with spin_initialize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
555c4fede3
commit
be1c84c96a
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue