mm/iob: iob_get_queue_count() should return the iob count

Change-Id: Ief7b98589613c59754f1a4d265aaa4760ad3d209
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2021-03-08 11:34:27 +08:00
committed by chao an
parent c52fc22af1
commit 92b0b1d0f2
+7 -3
View File
@@ -42,12 +42,16 @@
int iob_get_queue_count(FAR struct iob_queue_s *queue)
{
FAR struct iob_qentry_s *qentry;
FAR struct iob_qentry_s *iobq;
FAR struct iob_s *iob;
int count = 0;
for (qentry = queue->qh_head; qentry != NULL; qentry = qentry->qe_flink)
for (iobq = queue->qh_head; iobq != NULL; iobq = iobq->qe_flink)
{
count++;
for (iob = iobq->qe_head; iob; iob = iob->io_flink)
{
count++;
}
}
return count;