Fix zero-copy mbuf support

In 2017 there was a change in the mbuf API.
This commit is contained in:
Sebastian Huber 2019-05-13 09:31:17 +02:00
parent 60e753777a
commit 5da04d6837
3 changed files with 5 additions and 7 deletions

View File

@ -53,8 +53,7 @@ struct mbuf *rtems_bsd_m_get(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,
u_int *ref_cnt, void (*freef)(void *, void *), void *arg1,
void *arg2);
u_int *ref_cnt, m_ext_free_t *freef, void *arg1, void *arg2);
void rtems_bsd_m_free(struct mbuf *m);

View File

@ -55,8 +55,7 @@ rtems_bsd_m_gethdr(int how, short type)
void
rtems_bsd_m_extaddref(struct mbuf *m, void *buf, size_t size,
u_int *ref_cnt, void (*freef)(void *, void *), void *arg1,
void *arg2)
u_int *ref_cnt, m_ext_free_t *freef, void *arg1, void *arg2)
{
m_extaddref(m, buf, size, ref_cnt, freef, arg1, arg2);
}

View File

@ -82,10 +82,10 @@ struct buffer_control {
static struct buffer_control buffer_control;
static void
buffer_free(void *arg1, void *arg2)
buffer_free(struct mbuf *m)
{
struct buffer_control *bc = arg1;
struct buffer *buf = arg2;
struct buffer_control *bc = m->m_ext.ext_arg1;
struct buffer *buf = m->m_ext.ext_arg2;
rtems_status_code sc;
rtems_interrupt_lock_context lock_context;
rtems_id waiting_task;