speed limit 80
This commit is contained in:
parent
1f1b1925f3
commit
492367a1e1
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_futex.c,v 1.35 2016/08/15 09:20:11 maxv Exp $ */
|
||||
/* $NetBSD: linux_futex.c,v 1.36 2017/04/09 00:02:30 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.35 2016/08/15 09:20:11 maxv Exp $");
|
||||
__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.36 2017/04/09 00:02:30 dholland Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
@ -112,7 +112,8 @@ static int futex_wake(struct futex *, int, struct futex *, int);
|
||||
static int futex_atomic_op(lwp_t *, int, void *);
|
||||
|
||||
int
|
||||
linux_sys_futex(struct lwp *l, const struct linux_sys_futex_args *uap, register_t *retval)
|
||||
linux_sys_futex(struct lwp *l, const struct linux_sys_futex_args *uap,
|
||||
register_t *retval)
|
||||
{
|
||||
/* {
|
||||
syscallarg(int *) uaddr;
|
||||
@ -138,7 +139,8 @@ linux_sys_futex(struct lwp *l, const struct linux_sys_futex_args *uap, register_
|
||||
}
|
||||
|
||||
int
|
||||
linux_do_futex(struct lwp *l, const struct linux_sys_futex_args *uap, register_t *retval, struct timespec *ts)
|
||||
linux_do_futex(struct lwp *l, const struct linux_sys_futex_args *uap,
|
||||
register_t *retval, struct timespec *ts)
|
||||
{
|
||||
/* {
|
||||
syscallarg(int *) uaddr;
|
||||
@ -196,12 +198,13 @@ linux_do_futex(struct lwp *l, const struct linux_sys_futex_args *uap, register_t
|
||||
if (error != ETIMEDOUT)
|
||||
return error;
|
||||
/*
|
||||
* If the user process requests a non null timeout,
|
||||
* make sure we do not turn it into an infinite
|
||||
* timeout because tout is 0.
|
||||
* If the user process requests a non null
|
||||
* timeout, make sure we do not turn it into
|
||||
* an infinite timeout because tout is 0.
|
||||
*
|
||||
* We use a minimal timeout of 1/hz. Maybe it would make
|
||||
* sense to just return ETIMEDOUT without sleeping.
|
||||
* We use a minimal timeout of 1/hz. Maybe it
|
||||
* would make sense to just return ETIMEDOUT
|
||||
* without sleeping.
|
||||
*/
|
||||
if (SCARG(uap, timeout) != NULL)
|
||||
tout = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user