This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 6f33dd6ea0 mm/heap: Change TCB_FLAG_HEAPCHECK to TCB_FLAG_HEAP_CHECK
6f33dd6ea0 is described below

commit 6f33dd6ea0d85192540de8f420f43517f379e520
Author: Xiang Xiao <xiaoxi...@xiaomi.com>
AuthorDate: Sat Nov 12 14:18:25 2022 +0800

    mm/heap: Change TCB_FLAG_HEAPCHECK to TCB_FLAG_HEAP_CHECK
    
    align with other flags naming convention
    
    Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com>
---
 fs/procfs/fs_procfsproc.c | 6 +++---
 include/nuttx/sched.h     | 2 +-
 sched/irq/irq_dispatch.c  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c
index 4c7bd4273d..a93eb81148 100644
--- a/fs/procfs/fs_procfsproc.c
+++ b/fs/procfs/fs_procfsproc.c
@@ -984,7 +984,7 @@ static ssize_t proc_heapcheck(FAR struct proc_file_s 
*procfile,
   size_t totalsize = 0;
   size_t heapcheck = 0;
 
-  if (tcb->flags & TCB_FLAG_HEAPCHECK)
+  if (tcb->flags & TCB_FLAG_HEAP_CHECK)
     {
       heapcheck = 1;
     }
@@ -1006,10 +1006,10 @@ static ssize_t proc_heapcheck_write(FAR struct 
proc_file_s *procfile,
   switch (atoi(buffer))
     {
       case 0:
-        tcb->flags &= ~TCB_FLAG_HEAPCHECK;
+        tcb->flags &= ~TCB_FLAG_HEAP_CHECK;
         break;
       case 1:
-        tcb->flags |= TCB_FLAG_HEAPCHECK;
+        tcb->flags |= TCB_FLAG_HEAP_CHECK;
         break;
       default:
         ferr("ERROR: invalid argument\n");
diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h
index 64b55c07dd..c2334d812a 100644
--- a/include/nuttx/sched.h
+++ b/include/nuttx/sched.h
@@ -101,7 +101,7 @@
 #define TCB_FLAG_SYSCALL           (1 << 10)                     /* Bit 9: In 
a system call */
 #define TCB_FLAG_EXIT_PROCESSING   (1 << 11)                     /* Bit 10: 
Exitting */
 #define TCB_FLAG_FREE_STACK        (1 << 12)                     /* Bit 12: 
Free stack after exit */
-#define TCB_FLAG_HEAPCHECK         (1 << 13)                     /* Bit 13: 
Heap check */
+#define TCB_FLAG_HEAP_CHECK        (1 << 13)                     /* Bit 13: 
Heap check */
                                                                  /* Bits 
14-15: Available */
 
 /* Values for struct task_group tg_flags */
diff --git a/sched/irq/irq_dispatch.c b/sched/irq/irq_dispatch.c
index 1c8e8149b2..5e502af17d 100644
--- a/sched/irq/irq_dispatch.c
+++ b/sched/irq/irq_dispatch.c
@@ -178,8 +178,8 @@ void irq_dispatch(int irq, FAR void *context)
 #endif
 
 #ifdef CONFIG_DEBUG_MM
-  if ((rtcb->flags & TCB_FLAG_HEAPCHECK) || \
-       (this_task()->flags & TCB_FLAG_HEAPCHECK))
+  if ((rtcb->flags & TCB_FLAG_HEAP_CHECK) ||
+      (this_task()->flags & TCB_FLAG_HEAP_CHECK))
     {
       kmm_checkcorruption();
     }

Reply via email to