Skip to content

Commit

Permalink
net: buf: Add sys_snode_t member for convenience
Browse files Browse the repository at this point in the history
This makes it easy to use net_buf objects in sys_slist_t.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
Johan Hedberg authored and jhedberg committed Nov 1, 2017
1 parent 35a2633 commit 553af7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/net/buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ static inline void net_buf_simple_restore(struct net_buf_simple *buf,
*/
struct net_buf {
union {
/** FIFO uses first 4 bytes itself, reserve space */
int _unused;
/** Allow placing the buffer into sys_slist_t */
sys_snode_t node;

/** Fragments associated with this buffer. */
struct net_buf *frags;
Expand Down

0 comments on commit 553af7c

Please sign in to comment.