diff options
author | andre <andre@FreeBSD.org> | 2013-08-24 16:57:44 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2013-08-24 16:57:44 +0000 |
commit | b148bf45e00854fc92a79e2434843fc0ced325ba (patch) | |
tree | d9cb73f9fc061a57daf8eba0e946e359dfddf04c /sys/dev/hatm | |
parent | b7d376ce03e400fd642a642d69997ab017a9466e (diff) | |
download | FreeBSD-src-b148bf45e00854fc92a79e2434843fc0ced325ba.zip FreeBSD-src-b148bf45e00854fc92a79e2434843fc0ced325ba.tar.gz |
Add an mbuf pointer parameter to (*ext_free) to give the external
free function access to the mbuf the external memory was attached
to.
Mechanically adjust all users to include the mbuf parameter.
This fixes a long standing annoyance for external free functions.
Before one had to sacrifice one of the argument pointers for this.
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/dev/hatm')
-rw-r--r-- | sys/dev/hatm/if_hatm_intr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/hatm/if_hatm_intr.c b/sys/dev/hatm/if_hatm_intr.c index b6a5368..d23f119 100644 --- a/sys/dev/hatm/if_hatm_intr.c +++ b/sys/dev/hatm/if_hatm_intr.c @@ -261,7 +261,7 @@ hatm_mbuf_page_alloc(struct hatm_softc *sc, u_int group) * Free an mbuf and put it onto the free list. */ static void -hatm_mbuf0_free(void *buf, void *args) +hatm_mbuf0_free(struct mbuf *m, void *buf, void *args) { struct hatm_softc *sc = args; struct mbuf0_chunk *c = buf; @@ -272,7 +272,7 @@ hatm_mbuf0_free(void *buf, void *args) hatm_ext_free(&sc->mbuf_list[0], (struct mbufx_free *)c); } static void -hatm_mbuf1_free(void *buf, void *args) +hatm_mbuf1_free(struct mbuf *m, void *buf, void *args) { struct hatm_softc *sc = args; struct mbuf1_chunk *c = buf; @@ -461,7 +461,7 @@ hatm_rx_buffer(struct hatm_softc *sc, u_int group, u_int handle) hatm_mbuf0_free, c0, sc, M_PKTHDR, EXT_EXTREF); m->m_data += MBUF0_OFFSET; } else - hatm_mbuf0_free(c0, sc); + hatm_mbuf0_free(NULL, c0, sc); } else { struct mbuf1_chunk *c1; @@ -485,7 +485,7 @@ hatm_rx_buffer(struct hatm_softc *sc, u_int group, u_int handle) hatm_mbuf1_free, c1, sc, M_PKTHDR, EXT_EXTREF); m->m_data += MBUF1_OFFSET; } else - hatm_mbuf1_free(c1, sc); + hatm_mbuf1_free(NULL, c1, sc); } return (m); |