Deleted Added
full compact
mbuf.h (88449) mbuf.h (90227)
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)mbuf.h 8.5 (Berkeley) 2/19/95
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)mbuf.h 8.5 (Berkeley) 2/19/95
34 * $FreeBSD: head/sys/sys/mbuf.h 88449 2001-12-23 22:04:08Z bmilekic $
34 * $FreeBSD: head/sys/sys/mbuf.h 90227 2002-02-05 02:00:56Z dillon $
35 */
36
37#ifndef _SYS_MBUF_H_
38#define _SYS_MBUF_H_
39
40/*
41 * Mbufs are of a single size, MSIZE (machine/param.h), which
42 * includes overhead. An mbuf may add a single "mbuf cluster" of size

--- 236 unchanged lines hidden (view full) ---

279 * (for compatibility purposes).
280 */
281#define m_getclr m_get_clrd
282#define MGET(m, how, type) (m) = m_get((how), (type))
283#define MGETHDR(m, how, type) (m) = m_gethdr((how), (type))
284#define MCLGET(m, how) m_clget((m), (how))
285#define MEXTADD(m, buf, size, free, args, flags, type) \
286 m_extadd((m), (caddr_t)(buf), (size), (free), (args), (flags), (type))
35 */
36
37#ifndef _SYS_MBUF_H_
38#define _SYS_MBUF_H_
39
40/*
41 * Mbufs are of a single size, MSIZE (machine/param.h), which
42 * includes overhead. An mbuf may add a single "mbuf cluster" of size

--- 236 unchanged lines hidden (view full) ---

279 * (for compatibility purposes).
280 */
281#define m_getclr m_get_clrd
282#define MGET(m, how, type) (m) = m_get((how), (type))
283#define MGETHDR(m, how, type) (m) = m_gethdr((how), (type))
284#define MCLGET(m, how) m_clget((m), (how))
285#define MEXTADD(m, buf, size, free, args, flags, type) \
286 m_extadd((m), (caddr_t)(buf), (size), (free), (args), (flags), (type))
287#define MFREE(m, n) do { \
288 (n) = m_free((m)); \
289 (m) = NULL; \
290} while (0)
291
292/*
293 * MEXTFREE(m): disassociate (and possibly free) an external object from (m).
294 *
295 * If the atomic_cmpset_int() returns 0, then we effectively do nothing
296 * in terms of "cleaning up" (freeing the ext buf and ref. counter) as
297 * this means that either there are still references, or another thread
298 * is taking care of the clean-up.

--- 156 unchanged lines hidden ---
287
288/*
289 * MEXTFREE(m): disassociate (and possibly free) an external object from (m).
290 *
291 * If the atomic_cmpset_int() returns 0, then we effectively do nothing
292 * in terms of "cleaning up" (freeing the ext buf and ref. counter) as
293 * this means that either there are still references, or another thread
294 * is taking care of the clean-up.

--- 156 unchanged lines hidden ---