Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Add missing opt_inet.h.



details:   https://anonhg.NetBSD.org/src/rev/681bf5b22e1b
branches:  trunk
changeset: 959987:681bf5b22e1b
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Mar 04 01:35:31 2021 +0000

description:
Add missing opt_inet.h.

diffstat:

 sys/kern/uipc_mbuf.c    |  21 +++++++++++++++++++--
 sys/kern/uipc_socket2.c |   5 +++--
 2 files changed, 22 insertions(+), 4 deletions(-)

diffs (78 lines):

diff -r 83bc8490a9de -r 681bf5b22e1b sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c      Wed Mar 03 21:46:43 2021 +0000
+++ b/sys/kern/uipc_mbuf.c      Thu Mar 04 01:35:31 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_mbuf.c,v 1.241 2020/05/05 20:36:48 jdolecek Exp $ */
+/*     $NetBSD: uipc_mbuf.c,v 1.242 2021/03/04 01:35:31 msaitoh Exp $  */
 
 /*
  * Copyright (c) 1999, 2001, 2018 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.241 2020/05/05 20:36:48 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.242 2021/03/04 01:35:31 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mbuftrace.h"
@@ -120,6 +120,7 @@
 
 MALLOC_DEFINE(M_MBUF, "mbuf", "mbuf");
 
+void *watchpoint = (void *)0xdeadbeefdeadbeef;
 static percpu_t *mbstat_percpu;
 
 #ifdef MBUFTRACE
@@ -1992,6 +1993,7 @@
        return n;
 }
 
+#if 0
 void
 m_freem(struct mbuf *m)
 {
@@ -2001,6 +2003,21 @@
                m = m_free(m);
        } while (m);
 }
+#else
+void
+M_FREEM(struct mbuf *m, const char *func, int line)
+{
+       if (m == NULL)
+               return;
+       do {
+               if (((m->m_flags & M_EXT) != 0) &&
+                   (m->m_ext.ext_arg == watchpoint))
+                       printf("catch %p (%s line %d)\n", watchpoint,
+                           func, line);
+               m = m_free(m);
+       } while (m);
+}
+#endif
 
 #if defined(DDB)
 void
diff -r 83bc8490a9de -r 681bf5b22e1b sys/kern/uipc_socket2.c
--- a/sys/kern/uipc_socket2.c   Wed Mar 03 21:46:43 2021 +0000
+++ b/sys/kern/uipc_socket2.c   Thu Mar 04 01:35:31 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_socket2.c,v 1.138 2020/08/26 22:54:30 christos Exp $      */
+/*     $NetBSD: uipc_socket2.c,v 1.139 2021/03/04 01:35:31 msaitoh Exp $       */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,10 +58,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.138 2020/08/26 22:54:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.139 2021/03/04 01:35:31 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
+#include "opt_inet.h"
 #include "opt_mbuftrace.h"
 #include "opt_sb_max.h"
 #endif



Home | Main Index | Thread Index | Old Index