mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 01:39:44 +08:00
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:
committed by
Masayuki Ishikawa
parent
b353d84742
commit
18266c1012
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user