freebsd11_network: Fixup last commit for C++ compatibility.
This commit is contained in:
@@ -645,7 +645,7 @@ drbr_enqueue(struct ifnet *ifp, struct buf_ring *br, struct mbuf *m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static __inline void
|
static __inline void
|
||||||
drbr_putback(struct ifnet *ifp, struct buf_ring *br, struct mbuf *new)
|
drbr_putback(struct ifnet *ifp, struct buf_ring *br, struct mbuf *_new)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* The top of the list needs to be swapped
|
* The top of the list needs to be swapped
|
||||||
@@ -657,11 +657,11 @@ drbr_putback(struct ifnet *ifp, struct buf_ring *br, struct mbuf *new)
|
|||||||
* Peek in altq case dequeued it
|
* Peek in altq case dequeued it
|
||||||
* so put it back.
|
* so put it back.
|
||||||
*/
|
*/
|
||||||
IFQ_DRV_PREPEND(&ifp->if_snd, new);
|
IFQ_DRV_PREPEND(&ifp->if_snd, _new);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
buf_ring_putback_sc(br, new);
|
buf_ring_putback_sc(br, _new);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline struct mbuf *
|
static __inline struct mbuf *
|
||||||
@@ -680,7 +680,7 @@ drbr_peek(struct ifnet *ifp, struct buf_ring *br)
|
|||||||
return (m);
|
return (m);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return(buf_ring_peek_clear_sc(br));
|
return (struct mbuf*)buf_ring_peek_clear_sc(br);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline void
|
static __inline void
|
||||||
@@ -692,7 +692,7 @@ drbr_flush(struct ifnet *ifp, struct buf_ring *br)
|
|||||||
if (ifp != NULL && ALTQ_IS_ENABLED(&ifp->if_snd))
|
if (ifp != NULL && ALTQ_IS_ENABLED(&ifp->if_snd))
|
||||||
IFQ_PURGE(&ifp->if_snd);
|
IFQ_PURGE(&ifp->if_snd);
|
||||||
#endif
|
#endif
|
||||||
while ((m = buf_ring_dequeue_sc(br)) != NULL)
|
while ((m = (struct mbuf*)buf_ring_dequeue_sc(br)) != NULL)
|
||||||
m_freem(m);
|
m_freem(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -715,7 +715,7 @@ drbr_dequeue(struct ifnet *ifp, struct buf_ring *br)
|
|||||||
return (m);
|
return (m);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return (buf_ring_dequeue_sc(br));
|
return (struct mbuf*)buf_ring_dequeue_sc(br);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline void
|
static __inline void
|
||||||
@@ -748,11 +748,11 @@ drbr_dequeue_cond(struct ifnet *ifp, struct buf_ring *br,
|
|||||||
return (m);
|
return (m);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
m = buf_ring_peek(br);
|
m = (struct mbuf*)buf_ring_peek(br);
|
||||||
if (m == NULL || func(m, arg) == 0)
|
if (m == NULL || func(m, arg) == 0)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
return (buf_ring_dequeue_sc(br));
|
return (struct mbuf*)buf_ring_dequeue_sc(br);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline int
|
static __inline int
|
||||||
|
|||||||
@@ -267,11 +267,11 @@ buf_ring_advance_sc(struct buf_ring *br)
|
|||||||
* the compare and an atomic.
|
* the compare and an atomic.
|
||||||
*/
|
*/
|
||||||
static __inline void
|
static __inline void
|
||||||
buf_ring_putback_sc(struct buf_ring *br, void *new)
|
buf_ring_putback_sc(struct buf_ring *br, void *_new)
|
||||||
{
|
{
|
||||||
KASSERT(br->br_cons_head != br->br_prod_tail,
|
KASSERT(br->br_cons_head != br->br_prod_tail,
|
||||||
("Buf-Ring has none in putback")) ;
|
("Buf-Ring has none in putback")) ;
|
||||||
br->br_ring[br->br_cons_head] = new;
|
br->br_ring[br->br_cons_head] = _new;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user