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/sys/mbuf.h | |
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/sys/mbuf.h')
-rw-r--r-- | sys/sys/mbuf.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index cafbbdf..c250c87 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -148,7 +148,7 @@ struct m_ext { uint32_t ext_type:8, /* type of external storage */ ext_flags:24; /* external storage mbuf flags */ void (*ext_free) /* free routine if not the usual */ - (void *, void *); + (struct mbuf *, void *, void *); void *ext_arg1; /* optional argument pointer */ void *ext_arg2; /* optional argument pointer */ }; @@ -822,7 +822,8 @@ int m_apply(struct mbuf *, int, int, int m_append(struct mbuf *, int, c_caddr_t); void m_cat(struct mbuf *, struct mbuf *); int m_extadd(struct mbuf *, caddr_t, u_int, - void (*)(void *, void *), void *, void *, int, int, int); + void (*)(struct mbuf *, void *, void *), void *, void *, + int, int, int); struct mbuf *m_collapse(struct mbuf *, int, int); void m_copyback(struct mbuf *, int, int, c_caddr_t); void m_copydata(const struct mbuf *, int, int, caddr_t); |