mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-04 05:39:53 +00: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__
|
||||
#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
|
||||
#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,
|
||||
* the stack itself, or pbuf->next pointers from a chain.
|
||||
*/
|
||||
u16_t ref;
|
||||
LWIP_PBUF_REF_T ref;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user