Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Adjust PR_WRAP_USRREQS() to include the attach/detach fu...
details: https://anonhg.NetBSD.org/src/rev/89aef7dcd502
branches: trunk
changeset: 329353:89aef7dcd502
user: rmind <rmind%NetBSD.org@localhost>
date: Tue May 20 19:04:00 2014 +0000
description:
Adjust PR_WRAP_USRREQS() to include the attach/detach functions.
We still need the kernel-lock for some corner cases.
diffstat:
sys/net/rtsock.c | 12 ++++++------
sys/netatalk/ddp_usrreq.c | 9 +++++----
sys/netbt/hci_socket.c | 10 +++++-----
sys/netbt/l2cap_socket.c | 10 +++++-----
sys/netbt/rfcomm_socket.c | 10 +++++-----
sys/netbt/sco_socket.c | 10 +++++-----
sys/netinet/raw_ip.c | 9 +++++----
sys/netinet/tcp_usrreq.c | 9 +++++----
sys/netinet/udp_usrreq.c | 9 +++++----
sys/netinet6/raw_ip6.c | 9 +++++----
sys/netinet6/udp6_usrreq.c | 9 +++++----
sys/netipsec/keysock.c | 9 +++++----
sys/netmpls/mpls_proto.c | 9 +++++----
sys/netnatm/natm.c | 9 +++++----
sys/sys/protosw.h | 27 ++++++++++++++++++++++-----
15 files changed, 93 insertions(+), 67 deletions(-)
diffs (truncated from 480 to 300 lines):
diff -r 535d31b84ec7 -r 89aef7dcd502 sys/net/rtsock.c
--- a/sys/net/rtsock.c Tue May 20 18:32:08 2014 +0000
+++ b/sys/net/rtsock.c Tue May 20 19:04:00 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtsock.c,v 1.145 2014/05/19 02:51:24 rmind Exp $ */
+/* $NetBSD: rtsock.c,v 1.146 2014/05/20 19:04:00 rmind Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.145 2014/05/19 02:51:24 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.146 2014/05/20 19:04:00 rmind Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1318,14 +1318,14 @@
* Definitions of protocols supported in the ROUTE domain.
*/
#ifndef COMPAT_RTSOCK
-PR_WRAP_USRREQ(route_usrreq);
+PR_WRAP_USRREQS(route);
#else
-PR_WRAP_USRREQ(compat_50_route_usrreq);
+PR_WRAP_USRREQS(compat_50_route);
#endif
static const struct pr_usrreqs route_usrreqs = {
- .pr_attach = COMPATNAME(route_attach),
- .pr_detach = COMPATNAME(route_detach),
+ .pr_attach = COMPATNAME(route_attach_wrapper),
+ .pr_detach = COMPATNAME(route_detach_wrapper),
.pr_generic = COMPATNAME(route_usrreq_wrapper),
};
diff -r 535d31b84ec7 -r 89aef7dcd502 sys/netatalk/ddp_usrreq.c
--- a/sys/netatalk/ddp_usrreq.c Tue May 20 18:32:08 2014 +0000
+++ b/sys/netatalk/ddp_usrreq.c Tue May 20 19:04:00 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ddp_usrreq.c,v 1.43 2014/05/19 02:51:24 rmind Exp $ */
+/* $NetBSD: ddp_usrreq.c,v 1.44 2014/05/20 19:04:00 rmind Exp $ */
/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.43 2014/05/19 02:51:24 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.44 2014/05/20 19:04:00 rmind Exp $");
#include "opt_mbuftrace.h"
@@ -550,8 +550,9 @@
MOWNER_ATTACH(&aarp_mowner);
}
-PR_WRAP_USRREQ(ddp_usrreq)
-
+PR_WRAP_USRREQS(ddp)
+#define ddp_attach ddp_attach_wrapper
+#define ddp_detach ddp_detach_wrapper
#define ddp_usrreq ddp_usrreq_wrapper
const struct pr_usrreqs ddp_usrreqs = {
diff -r 535d31b84ec7 -r 89aef7dcd502 sys/netbt/hci_socket.c
--- a/sys/netbt/hci_socket.c Tue May 20 18:32:08 2014 +0000
+++ b/sys/netbt/hci_socket.c Tue May 20 19:04:00 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hci_socket.c,v 1.23 2014/05/20 18:25:54 rmind Exp $ */
+/* $NetBSD: hci_socket.c,v 1.24 2014/05/20 19:04:00 rmind Exp $ */
/*-
* Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.23 2014/05/20 18:25:54 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.24 2014/05/20 19:04:00 rmind Exp $");
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
@@ -864,10 +864,10 @@
}
}
-PR_WRAP_USRREQ(hci_usrreq)
+PR_WRAP_USRREQS(hci)
-//#define hci_attach hci_attach_wrapper
-//#define hci_detach hci_detach_wrapper
+#define hci_attach hci_attach_wrapper
+#define hci_detach hci_detach_wrapper
#define hci_usrreq hci_usrreq_wrapper
const struct pr_usrreqs hci_usrreqs = {
diff -r 535d31b84ec7 -r 89aef7dcd502 sys/netbt/l2cap_socket.c
--- a/sys/netbt/l2cap_socket.c Tue May 20 18:32:08 2014 +0000
+++ b/sys/netbt/l2cap_socket.c Tue May 20 19:04:00 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: l2cap_socket.c,v 1.14 2014/05/20 18:25:54 rmind Exp $ */
+/* $NetBSD: l2cap_socket.c,v 1.15 2014/05/20 19:04:00 rmind Exp $ */
/*-
* Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.14 2014/05/20 18:25:54 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.15 2014/05/20 19:04:00 rmind Exp $");
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
@@ -411,10 +411,10 @@
sorwakeup(so);
}
-PR_WRAP_USRREQ(l2cap_usrreq)
+PR_WRAP_USRREQS(l2cap)
-//#define l2cap_attach l2cap_attach_wrapper
-//#define l2cap_detach l2cap_detach_wrapper
+#define l2cap_attach l2cap_attach_wrapper
+#define l2cap_detach l2cap_detach_wrapper
#define l2cap_usrreq l2cap_usrreq_wrapper
const struct pr_usrreqs l2cap_usrreqs = {
diff -r 535d31b84ec7 -r 89aef7dcd502 sys/netbt/rfcomm_socket.c
--- a/sys/netbt/rfcomm_socket.c Tue May 20 18:32:08 2014 +0000
+++ b/sys/netbt/rfcomm_socket.c Tue May 20 19:04:00 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rfcomm_socket.c,v 1.15 2014/05/20 18:25:54 rmind Exp $ */
+/* $NetBSD: rfcomm_socket.c,v 1.16 2014/05/20 19:04:00 rmind Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.15 2014/05/20 18:25:54 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.16 2014/05/20 19:04:00 rmind Exp $");
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
@@ -424,10 +424,10 @@
sorwakeup(so);
}
-PR_WRAP_USRREQ(rfcomm_usrreq)
+PR_WRAP_USRREQS(rfcomm)
-//#define rfcomm_attach rfcomm_attach_wrapper
-//#define rfcomm_detach rfcomm_detach_wrapper
+#define rfcomm_attach rfcomm_attach_wrapper
+#define rfcomm_detach rfcomm_detach_wrapper
#define rfcomm_usrreq rfcomm_usrreq_wrapper
const struct pr_usrreqs rfcomm_usrreqs = {
diff -r 535d31b84ec7 -r 89aef7dcd502 sys/netbt/sco_socket.c
--- a/sys/netbt/sco_socket.c Tue May 20 18:32:08 2014 +0000
+++ b/sys/netbt/sco_socket.c Tue May 20 19:04:00 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sco_socket.c,v 1.16 2014/05/20 18:25:54 rmind Exp $ */
+/* $NetBSD: sco_socket.c,v 1.17 2014/05/20 19:04:00 rmind Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.16 2014/05/20 18:25:54 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.17 2014/05/20 19:04:00 rmind Exp $");
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
@@ -379,10 +379,10 @@
sorwakeup(so);
}
-PR_WRAP_USRREQ(sco_usrreq)
+PR_WRAP_USRREQS(sco)
-//#define sco_attach sco_attach_wrapper
-//#define sco_detach sco_detach_wrapper
+#define sco_attach sco_attach_wrapper
+#define sco_detach sco_detach_wrapper
#define sco_usrreq sco_usrreq_wrapper
const struct pr_usrreqs sco_usrreqs = {
diff -r 535d31b84ec7 -r 89aef7dcd502 sys/netinet/raw_ip.c
--- a/sys/netinet/raw_ip.c Tue May 20 18:32:08 2014 +0000
+++ b/sys/netinet/raw_ip.c Tue May 20 19:04:00 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: raw_ip.c,v 1.121 2014/05/19 02:51:25 rmind Exp $ */
+/* $NetBSD: raw_ip.c,v 1.122 2014/05/20 19:04:00 rmind Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.121 2014/05/19 02:51:25 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.122 2014/05/20 19:04:00 rmind Exp $");
#include "opt_inet.h"
#include "opt_compat_netbsd.h"
@@ -697,8 +697,9 @@
return error;
}
-PR_WRAP_USRREQ(rip_usrreq)
-
+PR_WRAP_USRREQS(rip)
+#define rip_attach rip_attach_wrapper
+#define rip_detach rip_detach_wrapper
#define rip_usrreq rip_usrreq_wrapper
const struct pr_usrreqs rip_usrreqs = {
diff -r 535d31b84ec7 -r 89aef7dcd502 sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c Tue May 20 18:32:08 2014 +0000
+++ b/sys/netinet/tcp_usrreq.c Tue May 20 19:04:00 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_usrreq.c,v 1.173 2014/05/19 02:51:25 rmind Exp $ */
+/* $NetBSD: tcp_usrreq.c,v 1.174 2014/05/20 19:04:00 rmind Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.173 2014/05/19 02:51:25 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.174 2014/05/20 19:04:00 rmind Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -2193,8 +2193,9 @@
#endif
}
-PR_WRAP_USRREQ(tcp_usrreq)
-
+PR_WRAP_USRREQS(tcp)
+#define tcp_attach tcp_attach_wrapper
+#define tcp_detach tcp_detach_wrapper
#define tcp_usrreq tcp_usrreq_wrapper
const struct pr_usrreqs tcp_usrreqs = {
diff -r 535d31b84ec7 -r 89aef7dcd502 sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c Tue May 20 18:32:08 2014 +0000
+++ b/sys/netinet/udp_usrreq.c Tue May 20 19:04:00 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udp_usrreq.c,v 1.196 2014/05/19 02:51:25 rmind Exp $ */
+/* $NetBSD: udp_usrreq.c,v 1.197 2014/05/20 19:04:00 rmind Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.196 2014/05/19 02:51:25 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.197 2014/05/20 19:04:00 rmind Exp $");
#include "opt_inet.h"
#include "opt_compat_netbsd.h"
@@ -1603,8 +1603,9 @@
}
#endif
-PR_WRAP_USRREQ(udp_usrreq)
-
+PR_WRAP_USRREQS(udp)
+#define udp_attach udp_attach_wrapper
+#define udp_detach udp_detach_wrapper
#define udp_usrreq udp_usrreq_wrapper
const struct pr_usrreqs udp_usrreqs = {
diff -r 535d31b84ec7 -r 89aef7dcd502 sys/netinet6/raw_ip6.c
--- a/sys/netinet6/raw_ip6.c Tue May 20 18:32:08 2014 +0000
+++ b/sys/netinet6/raw_ip6.c Tue May 20 19:04:00 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: raw_ip6.c,v 1.116 2014/05/19 02:51:25 rmind Exp $ */
+/* $NetBSD: raw_ip6.c,v 1.117 2014/05/20 19:04:00 rmind Exp $ */
/* $KAME: raw_ip6.c,v 1.82 2001/07/23 18:57:56 jinmei Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.116 2014/05/19 02:51:25 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.117 2014/05/20 19:04:00 rmind Exp $");
Home |
Main Index |
Thread Index |
Old Index