From 8437c049e63ccf57dc64d676fae2c8e40319186f Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Thu, 15 Jun 2017 23:30:18 +0800 Subject: [PATCH] [Kernel] Fix the number_mask initialization issue in TCB. --- src/thread.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/thread.c b/src/thread.c index 4f7e070e02..51e65e6e62 100644 --- a/src/thread.c +++ b/src/thread.c @@ -159,6 +159,12 @@ static rt_err_t _rt_thread_init(struct rt_thread *thread, thread->init_priority = priority; thread->current_priority = priority; + thread->number_mask = 0; +#if RT_THREAD_PRIORITY_MAX > 32 + thread->number = 0; + therad->high_mask = 0; +#endif + /* tick init */ thread->init_tick = tick; thread->remaining_tick = tick; -- GitLab