Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Use M_READONLY() rathern than a home-grown M_SHARED...



details:   https://anonhg.NetBSD.org/src/rev/81dfed1a3553
branches:  trunk
changeset: 526209:81dfed1a3553
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Apr 28 00:53:34 2002 +0000

description:
Use M_READONLY() rathern than a home-grown M_SHAREDCLUSTER().

diffstat:

 sys/kern/uipc_mbuf2.c |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (38 lines):

diff -r 71a67eae06c5 -r 81dfed1a3553 sys/kern/uipc_mbuf2.c
--- a/sys/kern/uipc_mbuf2.c     Sat Apr 27 23:38:22 2002 +0000
+++ b/sys/kern/uipc_mbuf2.c     Sun Apr 28 00:53:34 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_mbuf2.c,v 1.8 2001/11/12 15:25:31 lukem Exp $     */
+/*     $NetBSD: uipc_mbuf2.c,v 1.9 2002/04/28 00:53:34 thorpej Exp $   */
 /*     $KAME: uipc_mbuf2.c,v 1.29 2001/02/14 13:42:10 itojun Exp $     */
 
 /*
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf2.c,v 1.8 2001/11/12 15:25:31 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf2.c,v 1.9 2002/04/28 00:53:34 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -74,10 +74,6 @@
 #include <sys/malloc.h>
 #include <sys/mbuf.h>
 
-#define M_SHAREDCLUSTER(m) \
-       (((m)->m_flags & M_EXT) != 0 && \
-        ((m)->m_ext.ext_free || MCLISREFERENCED((m))))
-
 /*
  * ensure that [off, off + len) is contiguous on the mbuf chain "m".
  * packet chain before "off" is kept untouched.
@@ -121,7 +117,7 @@
                return NULL;    /* mbuf chain too short */
        }
 
-       sharedcluster = M_SHAREDCLUSTER(n);
+       sharedcluster = M_READONLY(n);
 
        /*
         * the target data is on <n, off>.



Home | Main Index | Thread Index | Old Index