mm/heap: Change TCB_FLAG_HEAPCHECK to TCB_FLAG_HEAP_CHECK

align with other flags naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-11-12 14:18:25 +08:00 committed by Petro Karashchenko
parent 3b78f6db3e
commit 6f33dd6ea0
3 changed files with 6 additions and 6 deletions

View File

@ -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");

View File

@ -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 */

View File

@ -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();
}