Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src wrap unportable register_t with a long. should do it in the...
details: https://anonhg.NetBSD.org/src/rev/be9b549c6205
branches: trunk
changeset: 786366:be9b549c6205
user: pooka <pooka%NetBSD.org@localhost>
date: Sat Apr 27 16:02:55 2013 +0000
description:
wrap unportable register_t with a long. should do it in the front
of the house too, but at least this is a start.
diffstat:
lib/librumpuser/rumpuser_sp.c | 9 ++++++---
sys/rump/include/rump/rumpuser.h | 4 ++--
sys/rump/librump/rumpkern/rump.c | 13 ++++++++-----
3 files changed, 16 insertions(+), 10 deletions(-)
diffs (104 lines):
diff -r c063634090c3 -r be9b549c6205 lib/librumpuser/rumpuser_sp.c
--- a/lib/librumpuser/rumpuser_sp.c Sat Apr 27 15:57:41 2013 +0000
+++ b/lib/librumpuser/rumpuser_sp.c Sat Apr 27 16:02:55 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpuser_sp.c,v 1.52 2013/04/27 14:59:08 pooka Exp $ */
+/* $NetBSD: rumpuser_sp.c,v 1.53 2013/04/27 16:02:56 pooka Exp $ */
/*
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -37,7 +37,7 @@
#include "rumpuser_port.h"
#if !defined(lint)
-__RCSID("$NetBSD: rumpuser_sp.c,v 1.52 2013/04/27 14:59:08 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_sp.c,v 1.53 2013/04/27 16:02:56 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -260,14 +260,17 @@
}
static int
-rumpsyscall(int sysnum, void *data, register_t *retval)
+rumpsyscall(int sysnum, void *data, register_t *regrv)
{
+ long retval[2] = {0, 0};
int rv;
spops.spop_schedule();
rv = spops.spop_syscall(sysnum, data, retval);
spops.spop_unschedule();
+ regrv[0] = retval[0];
+ regrv[1] = retval[1];
return rv;
}
diff -r c063634090c3 -r be9b549c6205 sys/rump/include/rump/rumpuser.h
--- a/sys/rump/include/rump/rumpuser.h Sat Apr 27 15:57:41 2013 +0000
+++ b/sys/rump/include/rump/rumpuser.h Sat Apr 27 16:02:55 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpuser.h,v 1.81 2013/04/27 15:34:53 pooka Exp $ */
+/* $NetBSD: rumpuser.h,v 1.82 2013/04/27 16:02:55 pooka Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -209,7 +209,7 @@
int (*spop_lwproc_rfork)(void *, int, const char *);
int (*spop_lwproc_newlwp)(pid_t);
struct lwp * (*spop_lwproc_curlwp)(void);
- int (*spop_syscall)(int, void *, register_t *);
+ int (*spop_syscall)(int, void *, long *);
void (*spop_lwpexit)(void);
void (*spop_execnotify)(const char *);
pid_t (*spop_getpid)(void);
diff -r c063634090c3 -r be9b549c6205 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c Sat Apr 27 15:57:41 2013 +0000
+++ b/sys/rump/librump/rumpkern/rump.c Sat Apr 27 16:02:55 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.259 2013/04/27 15:13:11 pooka Exp $ */
+/* $NetBSD: rump.c,v 1.260 2013/04/27 16:02:56 pooka Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.259 2013/04/27 15:13:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.260 2013/04/27 16:02:56 pooka Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -101,7 +101,7 @@
int rump_threads = 1;
#endif
-static int rump_proxy_syscall(int, void *, register_t *);
+static int rump_proxy_syscall(int, void *, long *);
static int rump_proxy_rfork(void *, int, const char *);
static void rump_proxy_lwpexit(void);
static void rump_proxy_execnotify(const char *);
@@ -781,8 +781,9 @@
}
static int
-rump_proxy_syscall(int num, void *arg, register_t *retval)
+rump_proxy_syscall(int num, void *arg, long *retval)
{
+ register_t regrv[2] = {0, 0};
struct lwp *l;
struct sysent *callp;
int rv;
@@ -792,7 +793,9 @@
callp = rump_sysent + num;
l = curlwp;
- rv = sy_call(callp, l, (void *)arg, retval);
+ rv = sy_call(callp, l, (void *)arg, regrv);
+ retval[0] = regrv[0];
+ retval[1] = regrv[1];
return rv;
}
Home |
Main Index |
Thread Index |
Old Index