Skip to content

Commit

Permalink
Actually use the specified timeout in futex_wait
Browse files Browse the repository at this point in the history
Fixes #573
  • Loading branch information
tbodt committed Dec 23, 2019
1 parent 3e33c60 commit 8579c95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ dword_t sys_futex(addr_t uaddr, dword_t op, dword_t val, addr_t timeout_or_val2,
STRACE("!FUTEX_PRIVATE ");
}
struct timespec timeout = {0};
if ((op & (FUTEX_WAIT_)) > 0) {
if ((op & FUTEX_CMD_MASK_) == FUTEX_WAIT_ && timeout_or_val2) {
struct timespec_ timeout_;
if (user_get(timeout_or_val2, timeout_))
return _EFAULT;
Expand Down

0 comments on commit 8579c95

Please sign in to comment.