Module Name: src Committed By: kre Date: Fri Dec 8 09:41:16 UTC 2017
Modified Files: src/lib/libpthread: pthread_compat.c Log Message: This time do _lwp_park() timeout unconsting correctly not just compilably. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libpthread/pthread_compat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libpthread/pthread_compat.c diff -u src/lib/libpthread/pthread_compat.c:1.4 src/lib/libpthread/pthread_compat.c:1.5 --- src/lib/libpthread/pthread_compat.c:1.4 Fri Dec 8 09:24:31 2017 +++ src/lib/libpthread/pthread_compat.c Fri Dec 8 09:41:16 2017 @@ -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 stru 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