mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
spinlock: use spin_lock_init replace spin_initialize
reason: 1: spin_lock_init and spin_initialize have similar functionalities. 2: spin_lock and spin_unlock should be called in matching pairs. Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
@@ -304,7 +304,7 @@ int mempool_init(FAR struct mempool_s *pool, FAR const char *name)
|
||||
kasan_poison(base, size);
|
||||
}
|
||||
|
||||
spin_initialize(&pool->lock, SP_UNLOCKED);
|
||||
spin_lock_init(&pool->lock);
|
||||
if (pool->wait && pool->expandsize == 0)
|
||||
{
|
||||
nxsem_init(&pool->waitsem, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user