mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-13 02:05:43 +00:00
pbuf: Use SYS_ARCH_INC in pbuf_ref()
Use SYS_ARCH_INC to simplify the code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
parent
40f2bed5c4
commit
1c5c96a50a
@ -766,12 +766,9 @@ pbuf_clen(struct pbuf *p)
|
|||||||
void
|
void
|
||||||
pbuf_ref(struct pbuf *p)
|
pbuf_ref(struct pbuf *p)
|
||||||
{
|
{
|
||||||
SYS_ARCH_DECL_PROTECT(old_level);
|
|
||||||
/* pbuf given? */
|
/* pbuf given? */
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
SYS_ARCH_PROTECT(old_level);
|
SYS_ARCH_INC(p->ref, 1);
|
||||||
++(p->ref);
|
|
||||||
SYS_ARCH_UNPROTECT(old_level);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user