init: add OSINIT_TASK_READY
reason: simplifying some code writing Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
aeb98d9c05
commit
40ae660d30
@ -38,6 +38,7 @@
|
||||
* initialization.
|
||||
*/
|
||||
|
||||
#define OSINIT_TASK_READY() (g_nx_initstate >= OSINIT_TASKLISTS)
|
||||
#define OSINIT_MM_READY() (g_nx_initstate >= OSINIT_MEMORY)
|
||||
#define OSINIT_HW_READY() (g_nx_initstate >= OSINIT_HARDWARE)
|
||||
#define OSINIT_OS_READY() (g_nx_initstate >= OSINIT_OSREADY)
|
||||
|
@ -62,7 +62,7 @@ bool sched_idletask(void)
|
||||
* have been initialized and, in that case, rtcb may be NULL.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(rtcb != NULL || g_nx_initstate < OSINIT_TASKLISTS);
|
||||
DEBUGASSERT(rtcb != NULL || !OSINIT_TASK_READY());
|
||||
if (rtcb != NULL)
|
||||
{
|
||||
/* The IDLE task TCB is distinguishable by a few things:
|
||||
|
Loading…
x
Reference in New Issue
Block a user