Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpthread This time do _lwp_park() timeout unconsting c...



details:   https://anonhg.NetBSD.org/src/rev/02c8e5f36bd7
branches:  trunk
changeset: 828320:02c8e5f36bd7
user:      kre <kre%NetBSD.org@localhost>
date:      Fri Dec 08 09:41:16 2017 +0000

description:
This time do _lwp_park() timeout unconsting correctly not just compilably.

diffstat:

 lib/libpthread/pthread_compat.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 69b078a058d4 -r 02c8e5f36bd7 lib/libpthread/pthread_compat.c
--- a/lib/libpthread/pthread_compat.c   Fri Dec 08 09:24:31 2017 +0000
+++ b/lib/libpthread/pthread_compat.c   Fri Dec 08 09:41:16 2017 +0000
@@ -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 @@
     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



Home | Main Index | Thread Index | Old Index