summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Hassler <hadfl@omnios.org>2022-12-07 17:06:40 +0000
committerDan McDonald <danmcd@mnx.io>2022-12-07 13:55:06 -0500
commitc83d696ab8659df240550a6a98b4b7b7d759b9d0 (patch)
tree7a7dbd21ba335762c0ee4443986ca83cb227c22c
parent3547bb669fbf4cedd7c88a4fe342f14b059fc311 (diff)
downloadillumos-joyent-c83d696ab8659df240550a6a98b4b7b7d759b9d0.tar.gz
OS-8430 LX: FUTEX_WAIT_BITSET should support timeout being NULL
Reviewed by: Dan McDonald <danmcd@mnx.io>
-rw-r--r--usr/src/uts/common/brand/lx/syscall/lx_futex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/src/uts/common/brand/lx/syscall/lx_futex.c b/usr/src/uts/common/brand/lx/syscall/lx_futex.c
index d2148f60e0..b6244223f9 100644
--- a/usr/src/uts/common/brand/lx/syscall/lx_futex.c
+++ b/usr/src/uts/common/brand/lx/syscall/lx_futex.c
@@ -25,6 +25,7 @@
/*
* Copyright 2020 Joyent, Inc.
+ * Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
*/
#include <sys/types.h>
@@ -1384,7 +1385,8 @@ lx_futex(uintptr_t addr, int op, int val, uintptr_t lx_timeout,
case FUTEX_WAIT_BITSET:
rval = futex_wait(&memid, (void *)addr, val, tptr, val3,
- (op & FUTEX_CLOCK_REALTIME) ? B_FALSE : B_TRUE);
+ (tptr == NULL || (op & FUTEX_CLOCK_REALTIME) != 0) ?
+ B_FALSE : B_TRUE);
break;
case FUTEX_WAKE: