mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user