Module Name: src
Committed By: dholland
Date: Mon Apr 10 15:04:32 UTC 2017
Modified Files:
src/sys/compat/linux/common: linux_futex.c linux_futex.h
src/sys/compat/linux32/common: linux32_misc.c
Log Message:
Return value pointers should be the last argument.
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/compat/linux/common/linux_futex.c
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/linux/common/linux_futex.h
cvs rdiff -u -r1.25 -r1.26 src/sys/compat/linux32/common/linux32_misc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/compat/linux/common/linux_futex.c
diff -u src/sys/compat/linux/common/linux_futex.c:1.36 src/sys/compat/linux/common/linux_futex.c:1.37
--- src/sys/compat/linux/common/linux_futex.c:1.36 Sun Apr 9 00:02:30 2017
+++ src/sys/compat/linux/common/linux_futex.c Mon Apr 10 15:04:32 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_futex.c,v 1.36 2017/04/09 00:02:30 dholland Exp $ */
+/* $NetBSD: linux_futex.c,v 1.37 2017/04/10 15:04:32 dholland Exp $ */
/*-
* Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.36 2017/04/09 00:02:30 dholland Exp $");
+__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.37 2017/04/10 15:04:32 dholland Exp $");
#include <sys/param.h>
#include <sys/time.h>
@@ -135,12 +135,15 @@ linux_sys_futex(struct lwp *l, const str
}
linux_to_native_timespec(&ts, <s);
}
- return linux_do_futex(l, uap, retval, &ts);
+ return linux_do_futex(l, uap, &ts, retval);
}
+/*
+ * Note: TS can't be const because ts2timo destroys it.
+ */
int
linux_do_futex(struct lwp *l, const struct linux_sys_futex_args *uap,
- register_t *retval, struct timespec *ts)
+ struct timespec *ts, register_t *retval)
{
/* {
syscallarg(int *) uaddr;
Index: src/sys/compat/linux/common/linux_futex.h
diff -u src/sys/compat/linux/common/linux_futex.h:1.7 src/sys/compat/linux/common/linux_futex.h:1.8
--- src/sys/compat/linux/common/linux_futex.h:1.7 Tue Apr 16 23:03:05 2013
+++ src/sys/compat/linux/common/linux_futex.h Mon Apr 10 15:04:32 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_futex.h,v 1.7 2013/04/16 23:03:05 christos Exp $ */
+/* $NetBSD: linux_futex.h,v 1.8 2017/04/10 15:04:32 dholland Exp $ */
/*-
* Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -86,7 +86,7 @@ struct linux_robust_list_head {
void release_futexes(struct lwp *);
struct linux_sys_futex_args;
int linux_do_futex(struct lwp *, const struct linux_sys_futex_args *,
- register_t *, struct timespec *);
+ struct timespec *, register_t *);
void linux_futex_init(void);
void linux_futex_fini(void);
Index: src/sys/compat/linux32/common/linux32_misc.c
diff -u src/sys/compat/linux32/common/linux32_misc.c:1.25 src/sys/compat/linux32/common/linux32_misc.c:1.26
--- src/sys/compat/linux32/common/linux32_misc.c:1.25 Sat Nov 22 13:12:22 2014
+++ src/sys/compat/linux32/common/linux32_misc.c Mon Apr 10 15:04:32 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_misc.c,v 1.25 2014/11/22 13:12:22 njoly Exp $ */
+/* $NetBSD: linux32_misc.c,v 1.26 2017/04/10 15:04:32 dholland Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.25 2014/11/22 13:12:22 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.26 2017/04/10 15:04:32 dholland Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -262,7 +262,7 @@ linux32_sys_futex(struct lwp *l,
}
linux32_to_native_timespec(&ts, <s);
}
- return linux_do_futex(l, &ua, retval, &ts);
+ return linux_do_futex(l, &ua, &ts, retval);
}
int