mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-13 15:40:06 +08:00
Fix zero-copy mbuf support
In 2017 there was a change in the mbuf API.
This commit is contained in:
parent
60e753777a
commit
5da04d6837
@ -53,8 +53,7 @@ struct mbuf *rtems_bsd_m_get(int how, short type);
|
|||||||
struct mbuf *rtems_bsd_m_gethdr(int how, short type);
|
struct mbuf *rtems_bsd_m_gethdr(int how, short type);
|
||||||
|
|
||||||
void rtems_bsd_m_extaddref(struct mbuf *m, void *buf, size_t size,
|
void rtems_bsd_m_extaddref(struct mbuf *m, void *buf, size_t size,
|
||||||
u_int *ref_cnt, void (*freef)(void *, void *), void *arg1,
|
u_int *ref_cnt, m_ext_free_t *freef, void *arg1, void *arg2);
|
||||||
void *arg2);
|
|
||||||
|
|
||||||
void rtems_bsd_m_free(struct mbuf *m);
|
void rtems_bsd_m_free(struct mbuf *m);
|
||||||
|
|
||||||
|
@ -55,8 +55,7 @@ rtems_bsd_m_gethdr(int how, short type)
|
|||||||
|
|
||||||
void
|
void
|
||||||
rtems_bsd_m_extaddref(struct mbuf *m, void *buf, size_t size,
|
rtems_bsd_m_extaddref(struct mbuf *m, void *buf, size_t size,
|
||||||
u_int *ref_cnt, void (*freef)(void *, void *), void *arg1,
|
u_int *ref_cnt, m_ext_free_t *freef, void *arg1, void *arg2)
|
||||||
void *arg2)
|
|
||||||
{
|
{
|
||||||
m_extaddref(m, buf, size, ref_cnt, freef, arg1, arg2);
|
m_extaddref(m, buf, size, ref_cnt, freef, arg1, arg2);
|
||||||
}
|
}
|
||||||
|
@ -82,10 +82,10 @@ struct buffer_control {
|
|||||||
static struct buffer_control buffer_control;
|
static struct buffer_control buffer_control;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
buffer_free(void *arg1, void *arg2)
|
buffer_free(struct mbuf *m)
|
||||||
{
|
{
|
||||||
struct buffer_control *bc = arg1;
|
struct buffer_control *bc = m->m_ext.ext_arg1;
|
||||||
struct buffer *buf = arg2;
|
struct buffer *buf = m->m_ext.ext_arg2;
|
||||||
rtems_status_code sc;
|
rtems_status_code sc;
|
||||||
rtems_interrupt_lock_context lock_context;
|
rtems_interrupt_lock_context lock_context;
|
||||||
rtems_id waiting_task;
|
rtems_id waiting_task;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user