Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 Move saemul_netbsd32 to netbsd32_sa.c an...
details: https://anonhg.NetBSD.org/src/rev/398163f8d094
branches: trunk
changeset: 749829:398163f8d094
user: matt <matt%NetBSD.org@localhost>
date: Thu Dec 10 14:10:35 2009 +0000
description:
Move saemul_netbsd32 to netbsd32_sa.c and allow the KERN_SA bits to be omitted.
diffstat:
sys/compat/netbsd32/files.netbsd32 | 4 ++--
sys/compat/netbsd32/netbsd32_netbsd.c | 21 +++------------------
sys/compat/netbsd32/netbsd32_sa.c | 19 +++++++++++++++++--
sys/compat/netbsd32/netbsd32_sa.h | 3 ++-
4 files changed, 24 insertions(+), 23 deletions(-)
diffs (124 lines):
diff -r 16fab0e30e55 -r 398163f8d094 sys/compat/netbsd32/files.netbsd32
--- a/sys/compat/netbsd32/files.netbsd32 Thu Dec 10 13:35:32 2009 +0000
+++ b/sys/compat/netbsd32/files.netbsd32 Thu Dec 10 14:10:35 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.netbsd32,v 1.28 2009/01/11 02:45:49 christos Exp $
+# $NetBSD: files.netbsd32,v 1.29 2009/12/10 14:10:35 matt Exp $
#
# config file description for machine-independent netbsd32 compat code.
# included by ports that need it.
@@ -17,7 +17,7 @@
file compat/netbsd32/netbsd32_ipc.c compat_netbsd32
file compat/netbsd32/netbsd32_lwp.c compat_netbsd32
file compat/netbsd32/netbsd32_mod.c compat_netbsd32
-file compat/netbsd32/netbsd32_sa.c compat_netbsd32
+file compat/netbsd32/netbsd32_sa.c compat_netbsd32 & kern_sa
file compat/netbsd32/netbsd32_select.c compat_netbsd32
file compat/netbsd32/netbsd32_sem.c compat_netbsd32 & p1003_1b_semaphore
file compat/netbsd32/netbsd32_signal.c compat_netbsd32
diff -r 16fab0e30e55 -r 398163f8d094 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c Thu Dec 10 13:35:32 2009 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c Thu Dec 10 14:10:35 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_netbsd.c,v 1.160 2009/11/21 11:54:54 njoly Exp $ */
+/* $NetBSD: netbsd32_netbsd.c,v 1.161 2009/12/10 14:10:35 matt Exp $ */
/*
* Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.160 2009/11/21 11:54:54 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.161 2009/12/10 14:10:35 matt Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@@ -117,21 +117,6 @@
extern struct sysctlnode netbsd32_sysctl_root;
-const struct sa_emul saemul_netbsd32 = {
- sizeof(ucontext32_t),
- sizeof(struct netbsd32_sa_t),
- sizeof(netbsd32_sa_tp),
- netbsd32_sacopyout,
- netbsd32_upcallconv,
- netbsd32_cpu_upcall,
- (void (*)(struct lwp *, void *))getucontext32_sa,
-#ifdef KERN_SA
- netbsd32_sa_ucsp
-#else
- NULL
-#endif
-};
-
struct emul emul_netbsd32 = {
.e_name = "netbsd32",
.e_path = "/emul/netbsd32",
@@ -174,7 +159,7 @@
.e_fault = NULL,
.e_vm_default_addr = netbsd32_vm_default_addr,
.e_usertrap = NULL,
-#ifdef COMPAT_40
+#if defined(COMPAT_40) && defined(KERN_SA)
.e_sa = &saemul_netbsd32,
#else
.e_sa = NULL,
diff -r 16fab0e30e55 -r 398163f8d094 sys/compat/netbsd32/netbsd32_sa.c
--- a/sys/compat/netbsd32/netbsd32_sa.c Thu Dec 10 13:35:32 2009 +0000
+++ b/sys/compat/netbsd32/netbsd32_sa.c Thu Dec 10 14:10:35 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_sa.c,v 1.10 2009/01/21 10:01:42 tron Exp $ */
+/* $NetBSD: netbsd32_sa.c,v 1.11 2009/12/10 14:10:35 matt Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation.
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_sa.c,v 1.10 2009/01/21 10:01:42 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_sa.c,v 1.11 2009/12/10 14:10:35 matt Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -51,6 +51,21 @@
#include <compat/netbsd32/netbsd32_conv.h>
#include <compat/netbsd32/netbsd32_sa.h>
+const struct sa_emul saemul_netbsd32 = {
+ sizeof(ucontext32_t),
+ sizeof(struct netbsd32_sa_t),
+ sizeof(netbsd32_sa_tp),
+ netbsd32_sacopyout,
+ netbsd32_upcallconv,
+ netbsd32_cpu_upcall,
+ (void (*)(struct lwp *, void *))getucontext32_sa,
+#ifdef KERN_SA
+ netbsd32_sa_ucsp
+#else
+ NULL
+#endif
+};
+
/* SA emulation helpers */
int
netbsd32_sacopyout(int type, const void *src, void *dst)
diff -r 16fab0e30e55 -r 398163f8d094 sys/compat/netbsd32/netbsd32_sa.h
--- a/sys/compat/netbsd32/netbsd32_sa.h Thu Dec 10 13:35:32 2009 +0000
+++ b/sys/compat/netbsd32/netbsd32_sa.h Thu Dec 10 14:10:35 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_sa.h,v 1.5 2008/10/15 06:52:38 wrstuden Exp $ */
+/* $NetBSD: netbsd32_sa.h,v 1.6 2009/12/10 14:10:35 matt Exp $ */
/*
* Copyright (c) 2006 The NetBSD Foundation.
@@ -42,6 +42,7 @@
};
typedef netbsd32_pointer_t netbsd32_sa_tp;
+extern const struct sa_emul saemul_netbsd32;
int netbsd32_sacopyout(int, const void *, void *);
int netbsd32_upcallconv(struct lwp *, int, size_t *, void **,
Home |
Main Index |
Thread Index |
Old Index