Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 Fix _lwp_ctl for big endian 64-bit platf...
details: https://anonhg.NetBSD.org/src/rev/153a7a3d4edb
branches: trunk
changeset: 808360:153a7a3d4edb
user: matt <matt%NetBSD.org@localhost>
date: Fri May 15 07:45:15 2015 +0000
description:
Fix _lwp_ctl for big endian 64-bit platforms. (little-endian too but not
as noticable).
diffstat:
sys/compat/netbsd32/netbsd32_lwp.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (38 lines):
diff -r 3fc7ec65b7b0 -r 153a7a3d4edb sys/compat/netbsd32/netbsd32_lwp.c
--- a/sys/compat/netbsd32/netbsd32_lwp.c Fri May 15 06:58:59 2015 +0000
+++ b/sys/compat/netbsd32/netbsd32_lwp.c Fri May 15 07:45:15 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_lwp.c,v 1.15 2013/03/29 01:04:30 christos Exp $ */
+/* $NetBSD: netbsd32_lwp.c,v 1.16 2015/05/15 07:45:15 matt Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 The NetBSD Foundation.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_lwp.c,v 1.15 2013/03/29 01:04:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_lwp.c,v 1.16 2015/05/15 07:45:15 matt Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -280,9 +280,15 @@
syscallarg(int) features;
syscallarg(netbsd32_pointer_t) address;
} */
- struct sys__lwp_ctl_args ua;
+ int error, features;
+ vaddr_t vaddr;
- NETBSD32TO64_UAP(features);
- NETBSD32TOP_UAP(address, struct lwpctl *);
- return sys__lwp_ctl(l, &ua, retval);
+ features = SCARG(uap, features);
+ features &= ~(LWPCTL_FEATURE_CURCPU | LWPCTL_FEATURE_PCTR);
+ if (features != 0)
+ return ENODEV;
+ if ((error = lwp_ctl_alloc(&vaddr)) != 0)
+ return error;
+ return copyout(&vaddr, SCARG_P32(uap, address),
+ sizeof(netbsd32_pointer_t));
}
Home |
Main Index |
Thread Index |
Old Index