From 6f33dd6ea0d85192540de8f420f43517f379e520 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sat, 12 Nov 2022 14:18:25 +0800 Subject: [PATCH] mm/heap: Change TCB_FLAG_HEAPCHECK to TCB_FLAG_HEAP_CHECK align with other flags naming convention Signed-off-by: Xiang Xiao --- 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(); }