[Kernel] Fix the number_mask initialization issue in TCB.

This commit is contained in:
Bernard Xiong 2017-06-15 23:30:18 +08:00
parent 9c44022502
commit 8437c049e6
1 changed files with 6 additions and 0 deletions

View File

@ -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;