MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_rbb_blk_queue_len

Function rt_rbb_blk_queue_len

components/drivers/ipc/ringblk_buf.c:479–492  ·  view source on GitHub ↗

* get all block length on block queue * * @param blk_queue the block queue * * @return total length */

Source from the content-addressed store, hash-verified

477 * @return total length
478 */
479rt_size_t rt_rbb_blk_queue_len(rt_rbb_blk_queue_t blk_queue)
480{
481 rt_size_t i = 0, data_total_size = 0;
482 rt_rbb_blk_t blk;
483
484 RT_ASSERT(blk_queue);
485
486 for (blk = blk_queue->blocks; i < blk_queue->blk_num; i++)
487 {
488 data_total_size += blk->size;
489 blk = rt_slist_entry(blk->list.next, struct rt_rbb_blk, list);
490 }
491 return data_total_size;
492}
493RTM_EXPORT(rt_rbb_blk_queue_len);
494
495/**

Callers 1

rbb_testFunction · 0.85

Calls

no outgoing calls

Tested by 1

rbb_testFunction · 0.68