diff --git a/src/thread.c b/src/thread.c old mode 100644 new mode 100755 index 30208f1dd13865a2404c1b6d6080b0ee0b1fe62a..79f4eb5f0701730dcfb92fa6706c49fd3c39be3f --- a/src/thread.c +++ b/src/thread.c @@ -191,6 +191,12 @@ static rt_err_t _thread_init(struct rt_thread *thread, thread->current_priority = priority; thread->number_mask = 0; + +#ifdef RT_USING_EVENT + thread->event_set = 0; + thread->event_info = 0; +#endif + #if RT_THREAD_PRIORITY_MAX > 32 thread->number = 0; thread->high_mask = 0; @@ -247,6 +253,13 @@ static rt_err_t _thread_init(struct rt_thread *thread, thread->duration_tick = 0; #endif + +#ifdef RT_USING_MODULE + thread->module_id = 0; +#endif + + thread->user_data = 0; + RT_OBJECT_HOOK_CALL(rt_thread_inited_hook, (thread)); return RT_EOK;