mirror of
https://github.com/apache/nuttx.git
synced 2026-10-05 05:07:48 +00:00
IOB: Some handy macros
This commit is contained in:
parent
a304a73608
commit
94259f725e
1 changed files with 5 additions and 0 deletions
|
|
@ -54,9 +54,14 @@
|
|||
|
||||
#define IOBFLAGS_MCAST (1 << 0) /* Multicast packet */
|
||||
|
||||
/* IOB helpers */
|
||||
|
||||
#define IOB_FREESPACE(n) (CONFIG_IOB_BUFSIZE - (n)->io_len - (n)->io_offset)
|
||||
|
||||
/* Queue helpers */
|
||||
|
||||
#define IOB_QINIT(q) do { (q)->qh_head = 0; (q)->qh_tail = 0; } while (0)
|
||||
#define IOB_QEMPTY(q) ((q)->head == NULL)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue