[kernel] 将rt_thread结构体改为显式继承rt_object (#7131)

This commit is contained in:
Shicheng Chu
2023-04-04 09:06:27 -04:00
committed by GitHub
parent 8a52e65013
commit 93f3cb30e4
49 changed files with 126 additions and 145 deletions
+1 -1
View File
@@ -213,7 +213,7 @@ rt_weak rt_size_t syslog_formater(char *log_buf, int level, const char *tag, rt_
/* is not in interrupt context */
if (rt_interrupt_get_nest() == 0)
{
log_len += ulog_strcpy(log_len, log_buf + log_len, rt_thread_self()->name);
log_len += ulog_strcpy(log_len, log_buf + log_len, rt_thread_self()->parent.name);
}
else
{
+1 -1
View File
@@ -352,7 +352,7 @@ rt_weak rt_size_t ulog_head_formater(char *log_buf, rt_uint32_t level, const cha
const char *thread_name = "N/A";
if (rt_thread_self())
{
thread_name = rt_thread_self()->name;
thread_name = rt_thread_self()->parent.name;
}
name_len = rt_strnlen(thread_name, RT_NAME_MAX);
rt_strncpy(log_buf + log_len, thread_name, name_len);