summaryrefslogtreecommitdiff
path: root/sys/kern/sys_futex.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2019-07-10 15:52:18 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2019-07-10 15:52:18 +0000
commitcfb2b7e76d2d97505ffb3e2ac6a43561e980f07a (patch)
tree57375b45402e93daf84974d3b5ef61dad0ad3bf9 /sys/kern/sys_futex.c
parent216b4df4872b72221e34128623cd77fa445857d3 (diff)
Stop sleeping at PUSER.
This allows to enforce that sleeping priorities will now always be < PUSER. ok visa@, ratchov@
Diffstat (limited to 'sys/kern/sys_futex.c')
-rw-r--r--sys/kern/sys_futex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sys_futex.c b/sys/kern/sys_futex.c
index 1bf8fff081e..0fbb31ad9ef 100644
--- a/sys/kern/sys_futex.c
+++ b/sys/kern/sys_futex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_futex.c,v 1.12 2019/02/06 15:11:20 mpi Exp $ */
+/* $OpenBSD: sys_futex.c,v 1.13 2019/07/10 15:52:17 mpi Exp $ */
/*
* Copyright (c) 2016-2017 Martin Pieuchot
@@ -254,7 +254,7 @@ futex_wait(uint32_t *uaddr, uint32_t val, const struct timespec *timeout,
TAILQ_INSERT_TAIL(&f->ft_threads, p, p_fut_link);
p->p_futex = f;
- error = rwsleep(p, &ftlock, PUSER|PCATCH, "fsleep", (int)to_ticks);
+ error = rwsleep(p, &ftlock, PWAIT|PCATCH, "fsleep", (int)to_ticks);
if (error == ERESTART)
error = ECANCELED;
else if (error == EWOULDBLOCK) {