mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-25 00:37:18 +00:00
[kernel] 将rt_thread结构体改为显式继承rt_object (#7131)
This commit is contained in:
@@ -1525,7 +1525,7 @@ long _sys_clone(void *arg[])
|
||||
goto fail;
|
||||
}
|
||||
|
||||
thread = rt_thread_create(self->name,
|
||||
thread = rt_thread_create(self->parent.name,
|
||||
RT_NULL,
|
||||
RT_NULL,
|
||||
self->stack_size,
|
||||
@@ -1713,7 +1713,7 @@ sysret_t _sys_fork(void)
|
||||
/* create thread */
|
||||
self_thread = rt_thread_self();
|
||||
|
||||
thread = rt_thread_create(self_thread->name,
|
||||
thread = rt_thread_create(self_thread->parent.name,
|
||||
RT_NULL,
|
||||
RT_NULL,
|
||||
self_thread->stack_size,
|
||||
@@ -2361,7 +2361,7 @@ sysret_t sys_execve(const char *path, char *const argv[], char *const envp[])
|
||||
/* load ok, now set thread name and swap the data of lwp and new_lwp */
|
||||
level = rt_hw_interrupt_disable();
|
||||
|
||||
rt_strncpy(thread->name, run_name + last_backslash, RT_NAME_MAX);
|
||||
rt_strncpy(thread->parent.name, run_name + last_backslash, RT_NAME_MAX);
|
||||
|
||||
rt_pages_free(page, 0);
|
||||
|
||||
@@ -2420,7 +2420,7 @@ rt_err_t sys_thread_delete(rt_thread_t thread)
|
||||
#else
|
||||
rt_err_t ret = 0;
|
||||
|
||||
if(thread->type != RT_Object_Class_Thread)
|
||||
if(thread->parent.type != RT_Object_Class_Thread)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
goto __exit;
|
||||
|
||||
Reference in New Issue
Block a user