diff options
| author | Bernard Xiong <[email protected]> | 2017-06-15 23:30:18 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2017-06-15 23:30:18 +0800 |
| commit | 8437c049e63ccf57dc64d676fae2c8e40319186f (patch) | |
| tree | 091ce486a844011017ca55863b7531aab608ea34 /src | |
| parent | 9c44022502deb218ad9b9ee47d2f811ae7e976a5 (diff) | |
[Kernel] Fix the number_mask initialization issue in TCB.
Diffstat (limited to 'src')
| -rw-r--r-- | src/thread.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |
