nuttx/sched: use pid to check idle task

Pid is more appropriate than the flink pointer to determine idle task,
when we want to use other data structure to optimize the task list.
This commit is contained in:
zhangyuan21
2022-10-28 14:22:17 +08:00
committed by Masayuki Ishikawa
parent b353d84742
commit 18266c1012
14 changed files with 17 additions and 15 deletions
+1 -1
View File
@@ -180,7 +180,7 @@ int nxmq_wait_receive(FAR struct mqueue_inode_s *msgq,
* isn't going to end well.
*/
DEBUGASSERT(NULL != rtcb->flink);
DEBUGASSERT(!is_idle_task(rtcb));
up_block_task(rtcb, TSTATE_WAIT_MQNOTEMPTY);
/* When we resume at this point, either (1) the message queue
+1 -1
View File
@@ -266,7 +266,7 @@ int nxmq_wait_send(FAR struct mqueue_inode_s *msgq, int oflags)
* isn't going to end well.
*/
DEBUGASSERT(NULL != rtcb->flink);
DEBUGASSERT(!is_idle_task(rtcb));
up_block_task(rtcb, TSTATE_WAIT_MQNOTFULL);
/* When we resume at this point, either (1) the message queue