mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 09:49:21 +08:00
bluetooth: replace leave_critical_section with spin_unlock_irqrestore
since the resouce in bt_buf is protected by spin_lock_irqresave Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
3dfb897ed1
commit
5c0d430b99
1 changed files with 2 additions and 2 deletions
|
@ -290,7 +290,7 @@ FAR struct bt_buf_s *bt_buf_alloc(enum bt_buf_type_e type,
|
|||
buf = g_buf_free;
|
||||
g_buf_free = buf->flink;
|
||||
|
||||
leave_critical_section(flags);
|
||||
spin_unlock_irqrestore(flags);
|
||||
pool = POOL_BUFFER_GENERAL;
|
||||
}
|
||||
else
|
||||
|
@ -300,7 +300,7 @@ FAR struct bt_buf_s *bt_buf_alloc(enum bt_buf_type_e type,
|
|||
* will have to allocate one from the kernel memory pool.
|
||||
*/
|
||||
|
||||
leave_critical_section(flags);
|
||||
spin_unlock_irqrestore(flags);
|
||||
buf = (FAR struct bt_buf_s *)
|
||||
kmm_malloc((sizeof (struct bt_buf_s)));
|
||||
|
||||
|
|
Loading…
Reference in a new issue