You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/10/27 14:27:21 UTC
(nuttx) branch master updated: mm: both use spin_lock_irqxx() when operated delaylist
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new fe03ce5fbe mm: both use spin_lock_irqxx() when operated delaylist
fe03ce5fbe is described below
commit fe03ce5fbe4b0e7e1f37ba753573d1369d42ec25
Author: ligd <li...@xiaomi.com>
AuthorDate: Fri Oct 27 16:21:35 2023 +0800
mm: both use spin_lock_irqxx() when operated delaylist
align with free_delaylist()
Signed-off-by: ligd <li...@xiaomi.com>
---
mm/mm_heap/mm_free.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/mm_heap/mm_free.c b/mm/mm_heap/mm_free.c
index 4700aeeede..7716c720ce 100644
--- a/mm/mm_heap/mm_free.c
+++ b/mm/mm_heap/mm_free.c
@@ -45,12 +45,12 @@ static void add_delaylist(FAR struct mm_heap_s *heap, FAR void *mem)
/* Delay the deallocation until a more appropriate time. */
- flags = enter_critical_section();
+ flags = spin_lock_irqsave(NULL);
tmp->flink = heap->mm_delaylist[up_cpu_index()];
heap->mm_delaylist[up_cpu_index()] = tmp;
- leave_critical_section(flags);
+ spin_unlock_irqrestore(NULL, flags);
#endif
}