Date: Sat, 24 Aug 2013 19:58:36 +0000 (UTC) From: Andre Oppermann <andre@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254805 - head/sys/sys Message-ID: <201308241958.r7OJwaxV031368@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andre Date: Sat Aug 24 19:58:36 2013 New Revision: 254805 URL: http://svnweb.freebsd.org/changeset/base/254805 Log: Add mtodo(m, o) macro taking an additional offset into the mbuf data section. Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Sat Aug 24 19:51:18 2013 (r254804) +++ head/sys/sys/mbuf.h Sat Aug 24 19:58:36 2013 (r254805) @@ -67,8 +67,10 @@ * type: * * mtod(m, t) -- Convert mbuf pointer to data pointer of correct type. + * mtodo(m, o) -- Same as above but with offset 'o' into data. */ #define mtod(m, t) ((t)((m)->m_data)) +#define mtodo(m, o) ((void *)(((m)->m_data) + (o))) /* * Argument structure passed to UMA routines during mbuf and packet
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308241958.r7OJwaxV031368>