mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-07 15:04:39 +08:00
Make pbuf refcount type an LWIP option and #define it to s8_t (to be able to check for underflow!)
This commit is contained in:
parent
5c55978f10
commit
2e1b12d09f
@ -1395,6 +1395,14 @@
|
|||||||
#if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__
|
#if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__
|
||||||
#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
|
#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LWIP_PBUF_REF_T: Refcount type in pbuf. Must be signed!
|
||||||
|
* Default width of s8_t can be increased if 127 refs are not enough for you.
|
||||||
|
*/
|
||||||
|
#ifndef LWIP_PBUF_REF_T
|
||||||
|
#define LWIP_PBUF_REF_T s8_t
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -169,7 +169,7 @@ struct pbuf {
|
|||||||
* that refer to this pbuf. This can be pointers from an application,
|
* that refer to this pbuf. This can be pointers from an application,
|
||||||
* the stack itself, or pbuf->next pointers from a chain.
|
* the stack itself, or pbuf->next pointers from a chain.
|
||||||
*/
|
*/
|
||||||
u16_t ref;
|
LWIP_PBUF_REF_T ref;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user