summaryrefslogtreecommitdiff
path: root/lib/libpthread
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2007-02-09 23:53:24 +0000
committerad <ad@NetBSD.org>2007-02-09 23:53:24 +0000
commit3247035dcc7aa94a68df21697fcf2fb68a906eb6 (patch)
tree4a918d1208c07958d0c9b5ac05e90dc0ee287e5d /lib/libpthread
parent88cb6cb84683274f130493fce5650bd8960dfefc (diff)
Cast the return value of _lwp_unpark_all(), just in case.
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/pthread.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libpthread/pthread.c b/lib/libpthread/pthread.c
index 3321bc415de..45a9eae7138 100644
--- a/lib/libpthread/pthread.c
+++ b/lib/libpthread/pthread.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread.c,v 1.58 2007/01/31 23:55:20 christos Exp $ */
+/* $NetBSD: pthread.c,v 1.59 2007/02/09 23:53:24 ad Exp $ */
/*-
* Copyright (c) 2001, 2002, 2003, 2006 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread.c,v 1.58 2007/01/31 23:55:20 christos Exp $");
+__RCSID("$NetBSD: pthread.c,v 1.59 2007/02/09 23:53:24 ad Exp $");
#include <err.h>
#include <errno.h>
@@ -191,7 +191,9 @@ pthread_init(void)
pthread__nspins = PTHREAD__NSPINS;
else
pthread__nspins = 1;
- i = _lwp_unpark_all(NULL, 0, NULL);
+ i = (int)_lwp_unpark_all(NULL, 0, NULL);
+ if (i == -1)
+ err(1, "_lwp_unpark_all");
if (i < pthread__unpark_max)
pthread__unpark_max = i;
#endif