summaryrefslogtreecommitdiff
path: root/lib/libpthread/t_condwait.c
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2017-01-16 17:25:48 +0000
committerEnji Cooper <ngie@FreeBSD.org>2017-01-16 17:25:48 +0000
commit03c41ac965df56079c04c1750c684b942e27c59a (patch)
tree95238c07f579c78188d230f8759f0d0345b0f6ae /lib/libpthread/t_condwait.c
parent181439425f0bb490970e4e7022295f139d9988ad (diff)
Notes
Diffstat (limited to 'lib/libpthread/t_condwait.c')
-rw-r--r--lib/libpthread/t_condwait.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libpthread/t_condwait.c b/lib/libpthread/t_condwait.c
index 9b79587104cfa..58b4a8bc155aa 100644
--- a/lib/libpthread/t_condwait.c
+++ b/lib/libpthread/t_condwait.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_condwait.c,v 1.4 2013/04/12 17:18:11 christos Exp $ */
+/* $NetBSD: t_condwait.c,v 1.5 2017/01/16 16:29:19 christos Exp $ */
/*
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -26,8 +26,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_condwait.c,v 1.4 2013/04/12 17:18:11 christos Exp $");
+__RCSID("$NetBSD: t_condwait.c,v 1.5 2017/01/16 16:29:19 christos Exp $");
+#include <sys/time.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
@@ -40,6 +41,8 @@ __RCSID("$NetBSD: t_condwait.c,v 1.4 2013/04/12 17:18:11 christos Exp $");
#include "isqemu.h"
+#include "h_common.h"
+
#define WAITTIME 2 /* Timeout wait secound */
static const int debug = 1;
@@ -56,8 +59,8 @@ run(void *param)
clck = *(clockid_t *)param;
- pthread_condattr_init(&attr);
- pthread_condattr_setclock(&attr, clck); /* MONOTONIC or MONOTONIC */
+ PTHREAD_REQUIRE(pthread_condattr_init(&attr));
+ PTHREAD_REQUIRE(pthread_condattr_setclock(&attr, clck));
pthread_cond_init(&cond, &attr);
ATF_REQUIRE_EQ((ret = pthread_mutex_lock(&m)), 0);