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:
hujun5
2024-11-20 09:01:45 +08:00
committed by Xiang Xiao
parent e69903c939
commit 34e79f9618
10 changed files with 19 additions and 29 deletions
+1 -1
View File
@@ -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);