diff options
| author | kre <kre@NetBSD.org> | 2017-12-08 09:41:16 +0000 |
|---|---|---|
| committer | kre <kre@NetBSD.org> | 2017-12-08 09:41:16 +0000 |
| commit | 3fe61644a6e2bc9fa0a81f7c9d375535113555bc (patch) | |
| tree | 6d2363e07e7105f7a8fb5981798f08c41f43d04c /lib/libpthread | |
| parent | f6908a27c325284fccf6a50285c7b19bba472127 (diff) | |
This time do _lwp_park() timeout unconsting correctly not just compilably.
Diffstat (limited to 'lib/libpthread')
| -rw-r--r-- | lib/libpthread/pthread_compat.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libpthread/pthread_compat.c b/lib/libpthread/pthread_compat.c index 82963fb25e3..20823700ea7 100644 --- a/lib/libpthread/pthread_compat.c +++ b/lib/libpthread/pthread_compat.c @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_compat.c,v 1.4 2017/12/08 09:24:31 kre Exp $ */ +/* $NetBSD: pthread_compat.c,v 1.5 2017/12/08 09:41:16 kre Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: pthread_compat.c,v 1.4 2017/12/08 09:24:31 kre Exp $"); +__RCSID("$NetBSD: pthread_compat.c,v 1.5 2017/12/08 09:41:16 kre Exp $"); #include <sys/param.h> #include <sys/syscall.h> @@ -89,9 +89,12 @@ _lwp_park(clockid_t a, int b, const struct timespec *c, lwpid_t d, const void *e, const void *f) { - struct timespec t = *c; + if (c != NULL) { + struct timespec t = *c; - return syscall(SYS____lwp_park60, a, b, &t, d, e, f); + return syscall(SYS____lwp_park60, a, b, &t, d, e, f); + } else + return syscall(SYS____lwp_park60, a, b, NULL, d, e, f); } int |
