Move saemul_netbsd32 to netbsd32_sa.c and allow the KERN_SA bits to be omitted.
This commit is contained in:
parent
612627584e
commit
a3e1558eec
@ -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_ioctl.c compat_netbsd32
|
||||
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
|
||||
|
@ -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 @@ struct uvm_object *emul_netbsd32_object;
|
||||
|
||||
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 @@ struct emul emul_netbsd32 = {
|
||||
.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,
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_sa.c,v 1.10 2009/01/21 10:01:42 tron Exp $"
|
||||
#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)
|
||||
|
@ -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 @@ struct netbsd32_sa_t {
|
||||
};
|
||||
|
||||
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 **,
|
||||
|
Loading…
Reference in New Issue
Block a user