From 93f3cb30e48d5de341bda09fa806120e2bc3f3ad Mon Sep 17 00:00:00 2001 From: Shicheng Chu <1468559561@qq.com> Date: Tue, 4 Apr 2023 21:06:27 +0800 Subject: [kernel] 将rt_thread结构体改为显式继承rt_object (#7131) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libcpu/sim/posix/cpu_port.c | 4 ++-- libcpu/sim/win32/cpu_port.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'libcpu/sim') diff --git a/libcpu/sim/posix/cpu_port.c b/libcpu/sim/posix/cpu_port.c index dc3e9379dd..636f82cde1 100644 --- a/libcpu/sim/posix/cpu_port.c +++ b/libcpu/sim/posix/cpu_port.c @@ -163,11 +163,11 @@ static void *thread_run(void *parameter) tid = rt_thread_self(); TRACE("pid <%08x> tid <%s> starts...\n", (unsigned int)(thread->pthread), - tid->name); + tid->parent.name); thread->rtthread = tid; thread->task(thread->para); TRACE("pid <%08x> tid <%s> exit...\n", (unsigned int)(thread->pthread), - tid->name); + tid->parent.name); thread->exit(); /*TODO: diff --git a/libcpu/sim/win32/cpu_port.c b/libcpu/sim/win32/cpu_port.c index b7510819b9..4f8b32271b 100644 --- a/libcpu/sim/win32/cpu_port.c +++ b/libcpu/sim/win32/cpu_port.c @@ -147,7 +147,7 @@ static DWORD WINAPI thread_run( LPVOID lpThreadParameter ) rt_thread_t tid = rt_thread_self(); win_thread_t *pWinThread = (win_thread_t *)lpThreadParameter; - SetThreadName(GetCurrentThreadId(), tid->name); + SetThreadName(GetCurrentThreadId(), tid->parent.name); pWinThread->Entry(pWinThread->Param); -- cgit v1.3.1