arch/tcbinfo: fix build break if task name disabled

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2021-12-02 13:18:54 +08:00 committed by Xiang Xiao
parent 698f1f76ff
commit 437a30d117
8 changed files with 51 additions and 0 deletions

View File

@ -38,7 +38,9 @@ const struct tcbinfo_s g_tcbinfo =
TCB_PID_OFF,
TCB_STATE_OFF,
TCB_PRI_OFF,
#if CONFIG_TASK_NAME_SIZE > 0
TCB_NAME_OFF,
#endif
XCPTCONTEXT_REGS,
@ -62,3 +64,8 @@ const struct tcbinfo_s g_tcbinfo =
};
#endif
/****************************************************************************
* Public Functions
****************************************************************************/

View File

@ -38,7 +38,9 @@ const struct tcbinfo_s g_tcbinfo =
TCB_PID_OFF,
TCB_STATE_OFF,
TCB_PRI_OFF,
#if CONFIG_TASK_NAME_SIZE > 0
TCB_NAME_OFF,
#endif
XCPTCONTEXT_REGS,
@ -69,3 +71,8 @@ const struct tcbinfo_s g_tcbinfo =
};
#endif
/****************************************************************************
* Public Functions
****************************************************************************/

View File

@ -38,7 +38,9 @@ const struct tcbinfo_s g_tcbinfo =
TCB_PID_OFF,
TCB_STATE_OFF,
TCB_PRI_OFF,
#if CONFIG_TASK_NAME_SIZE > 0
TCB_NAME_OFF,
#endif
XCPTCONTEXT_REGS,
@ -106,3 +108,8 @@ const struct tcbinfo_s g_tcbinfo =
};
#endif
/****************************************************************************
* Public Functions
****************************************************************************/

View File

@ -38,7 +38,9 @@ const struct tcbinfo_s g_tcbinfo =
TCB_PID_OFF,
TCB_STATE_OFF,
TCB_PRI_OFF,
#if CONFIG_TASK_NAME_SIZE > 0
TCB_NAME_OFF,
#endif
XCPTCONTEXT_REGS,
@ -112,3 +114,8 @@ const struct tcbinfo_s g_tcbinfo =
};
#endif
/****************************************************************************
* Public Functions
****************************************************************************/

View File

@ -38,7 +38,9 @@ const struct tcbinfo_s g_tcbinfo =
TCB_PID_OFF,
TCB_STATE_OFF,
TCB_PRI_OFF,
#if CONFIG_TASK_NAME_SIZE > 0
TCB_NAME_OFF,
#endif
XCPTCONTEXT_REGS,
@ -106,3 +108,8 @@ const struct tcbinfo_s g_tcbinfo =
};
#endif
/****************************************************************************
* Public Functions
****************************************************************************/

View File

@ -38,7 +38,9 @@ const struct tcbinfo_s g_tcbinfo =
TCB_PID_OFF,
TCB_STATE_OFF,
TCB_PRI_OFF,
#if CONFIG_TASK_NAME_SIZE > 0
TCB_NAME_OFF,
#endif
XCPTCONTEXT_REGS,
@ -112,3 +114,8 @@ const struct tcbinfo_s g_tcbinfo =
};
#endif
/****************************************************************************
* Public Functions
****************************************************************************/

View File

@ -38,7 +38,9 @@ const struct tcbinfo_s g_tcbinfo =
TCB_PID_OFF,
TCB_STATE_OFF,
TCB_PRI_OFF,
#if CONFIG_TASK_NAME_SIZE > 0
TCB_NAME_OFF,
#endif
XCPTCONTEXT_REGS,
@ -116,3 +118,8 @@ const struct tcbinfo_s g_tcbinfo =
};
#endif
/****************************************************************************
* Public Functions
****************************************************************************/

View File

@ -189,7 +189,9 @@
# define TCB_PID_OFF (offsetof(struct tcb_s, pid))
# define TCB_STATE_OFF (offsetof(struct tcb_s, task_state))
# define TCB_PRI_OFF (offsetof(struct tcb_s, sched_priority))
#if CONFIG_TASK_NAME_SIZE > 0
# define TCB_NAME_OFF (offsetof(struct tcb_s, name))
#endif
# define TCB_REG_OFF(reg) (offsetof(struct tcb_s, xcp.regs[reg]))
#endif