diff options
| author | guo <[email protected]> | 2022-12-16 18:38:28 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-16 18:38:28 +0800 |
| commit | 68ca9f07a60ad5cbe52b37b52299327b6246e7f7 (patch) | |
| tree | b990c35d5b20e515adb604b85b2b10dae0cf034b /src/thread.c | |
| parent | 3ea5166376dbc05722d793c3183c15b3a01e7f3a (diff) | |
[rt-smart] 弱化 RT_USING_LWP,使用 RT_USING_SMART 作为宏配置 (#6740)
* [dfs] sync cromfs
* [rt-smart]Weaken RT_USING_LWP, use RT_USING_SMART as macro configuration
* [format] fix some format issue.
Diffstat (limited to 'src/thread.c')
| -rw-r--r-- | src/thread.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/thread.c b/src/thread.c index 1bc4169d30..6c642bb8a8 100644 --- a/src/thread.c +++ b/src/thread.c @@ -167,7 +167,7 @@ static rt_err_t _thread_init(struct rt_thread *thread, /* init thread list */ rt_list_init(&(thread->tlist)); -#ifdef RT_USING_LWP +#ifdef RT_USING_SMART thread->wakeup.func = RT_NULL; #endif @@ -255,7 +255,7 @@ static rt_err_t _thread_init(struct rt_thread *thread, thread->si_list = RT_NULL; #endif /* RT_USING_SIGNALS */ -#ifdef RT_USING_LWP +#ifdef RT_USING_SMART thread->lwp = RT_NULL; rt_list_init(&(thread->sibling)); rt_memset(&thread->signal, 0, sizeof(lwp_sigset_t)); @@ -642,7 +642,7 @@ rt_err_t rt_thread_sleep(rt_tick_t tick) rt_hw_interrupt_enable(level); thread->error = -RT_EINTR; - + rt_schedule(); /* clear error number of this thread to RT_EOK */ @@ -930,7 +930,7 @@ rt_err_t rt_thread_control(rt_thread_t thread, int cmd, void *arg) } RTM_EXPORT(rt_thread_control); -#ifdef RT_USING_LWP +#ifdef RT_USING_SMART int lwp_suspend_sigcheck(rt_thread_t thread, int suspend_flag); #endif @@ -998,7 +998,7 @@ rt_err_t rt_thread_suspend_with_flag(rt_thread_t thread, int suspend_flag) /* not suspend running status thread on other core */ RT_ASSERT(thread == rt_thread_self()); } -#ifdef RT_USING_LWP +#ifdef RT_USING_SMART if (lwp_suspend_sigcheck(thread, suspend_flag) == 0) { /* not to suspend */ @@ -1063,7 +1063,7 @@ rt_err_t rt_thread_resume(rt_thread_t thread) rt_timer_stop(&thread->thread_timer); -#ifdef RT_USING_LWP +#ifdef RT_USING_SMART thread->wakeup.func = RT_NULL; #endif @@ -1078,7 +1078,7 @@ rt_err_t rt_thread_resume(rt_thread_t thread) } RTM_EXPORT(rt_thread_resume); -#ifdef RT_USING_LWP +#ifdef RT_USING_SMART /** * This function will wakeup a thread with customized operation. * |
