mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-15 09:33:50 +01:00
sys/net/gnrc/pkt: use uint8_t for user count
It's very unlikely that a pkt snip will have more than 255 users. Use a uint8_t here to save 4 bytes per snip as this now fits into the ununsed struct padding.
This commit is contained in:
parent
2623762c16
commit
db2f3bd3dd
@ -110,17 +110,18 @@ typedef struct gnrc_pktsnip {
|
||||
struct gnrc_pktsnip *next; /**< next snip in the packet */
|
||||
void *data; /**< pointer to the data of the snip */
|
||||
size_t size; /**< the length of the snip in byte */
|
||||
/* end of iolist_t */
|
||||
#ifdef MODULE_GNRC_NETERR
|
||||
kernel_pid_t err_sub; /**< subscriber to errors related to this
|
||||
* packet snip */
|
||||
#endif
|
||||
gnrc_nettype_t type; /**< protocol of the packet snip */
|
||||
/**
|
||||
* @brief Counter of threads currently having control over this packet.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
unsigned int users;
|
||||
gnrc_nettype_t type; /**< protocol of the packet snip */
|
||||
#ifdef MODULE_GNRC_NETERR
|
||||
kernel_pid_t err_sub; /**< subscriber to errors related to this
|
||||
* packet snip */
|
||||
#endif
|
||||
uint8_t users;
|
||||
} gnrc_pktsnip_t;
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user