Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys domains are attached by module(-like) constructors, so n...
details: https://anonhg.NetBSD.org/src/rev/e25a8664e67b
branches: trunk
changeset: 795665:e25a8664e67b
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Apr 23 17:05:18 2014 +0000
description:
domains are attached by module(-like) constructors, so no need to
play link_set games with them.
diffstat:
sys/kern/uipc_domain.c | 10 ++++++++--
sys/rump/ldscript.rump | 9 +--------
2 files changed, 9 insertions(+), 10 deletions(-)
diffs (61 lines):
diff -r edecbae57a48 -r e25a8664e67b sys/kern/uipc_domain.c
--- a/sys/kern/uipc_domain.c Wed Apr 23 16:54:21 2014 +0000
+++ b/sys/kern/uipc_domain.c Wed Apr 23 17:05:18 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_domain.c,v 1.92 2014/04/17 16:14:22 christos Exp $ */
+/* $NetBSD: uipc_domain.c,v 1.93 2014/04/23 17:05:18 pooka Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.92 2014/04/17 16:14:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.93 2014/04/23 17:05:18 pooka Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -77,6 +77,10 @@
static struct sysctllog *domain_sysctllog;
static void sysctl_net_setup(void);
+/* ensure successful linkage even without any domains in link sets */
+static struct domain domain_dummy;
+__link_set_add_rodata(domains,domain_dummy);
+
void
domaininit(bool addroute)
{
@@ -91,6 +95,8 @@
* domain is added last.
*/
__link_set_foreach(dpp, domains) {
+ if (*dpp == &domain_dummy)
+ continue;
if ((*dpp)->dom_family == PF_ROUTE)
rt_domain = *dpp;
else
diff -r edecbae57a48 -r e25a8664e67b sys/rump/ldscript.rump
--- a/sys/rump/ldscript.rump Wed Apr 23 16:54:21 2014 +0000
+++ b/sys/rump/ldscript.rump Wed Apr 23 17:05:18 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ldscript.rump,v 1.2 2010/03/01 13:12:19 pooka Exp $ */
+/* $NetBSD: ldscript.rump,v 1.3 2014/04/23 17:05:18 pooka Exp $ */
/*
* From binutils 2.19 onwards (in NetBSD) binutils ld PROVIDEs
@@ -18,13 +18,6 @@
__stop_link_set_modules = .;
}
- link_set_domains :
- {
- __start_link_set_domains = .;
- *(link_set_domains);
- __stop_link_set_domains = .;
- }
-
link_set_rump_components :
{
__start_link_set_rump_components = .;
Home |
Main Index |
Thread Index |
Old Index