summaryrefslogtreecommitdiff
path: root/sys/compat/linux
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2017-04-10 15:04:32 +0000
committerdholland <dholland@NetBSD.org>2017-04-10 15:04:32 +0000
commitc8b4ff45448450c782cf9ecf6c182896c8a2bcf9 (patch)
tree73490fcdf90169ff87c682aba5678c6bd4b82b78 /sys/compat/linux
parent4bfb38f49b5010390e935eb94706557fd7b4e6c0 (diff)
Return value pointers should be the last argument.
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/common/linux_futex.c11
-rw-r--r--sys/compat/linux/common/linux_futex.h4
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/compat/linux/common/linux_futex.c b/sys/compat/linux/common/linux_futex.c
index b9109097e13..1bf68f4cb2e 100644
--- a/sys/compat/linux/common/linux_futex.c
+++ b/sys/compat/linux/common/linux_futex.c
@@ -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 struct linux_sys_futex_args *uap,
}
linux_to_native_timespec(&ts, &lts);
}
- 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;
diff --git a/sys/compat/linux/common/linux_futex.h b/sys/compat/linux/common/linux_futex.h
index 1720ede781c..c672920f717 100644
--- a/sys/compat/linux/common/linux_futex.h
+++ b/sys/compat/linux/common/linux_futex.h
@@ -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);