mirror of
https://github.com/apache/nuttx.git
synced 2026-05-18 17:18:28 +08:00
init: add OSINIT_TASK_READY
reason: simplifying some code writing Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user