Module Name:    src
Committed By:   kamil
Date:           Wed Jan 29 13:40:23 UTC 2020

Modified Files:
        src/tests/lib/libpthread: t_join.c

Log Message:
Fix the t_join test

For pthread_attr_get_np() attr should be initialized prior to the call by
using pthread_attr_init(3). pthread_getattr_np() does this
automatically so switch to it.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libpthread/t_join.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libpthread/t_join.c
diff -u src/tests/lib/libpthread/t_join.c:1.9 src/tests/lib/libpthread/t_join.c:1.10
--- src/tests/lib/libpthread/t_join.c:1.9	Sun Jul  2 16:41:33 2017
+++ src/tests/lib/libpthread/t_join.c	Wed Jan 29 13:40:23 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: t_join.c,v 1.9 2017/07/02 16:41:33 joerg Exp $ */
+/* $NetBSD: t_join.c,v 1.10 2020/01/29 13:40:23 kamil Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_join.c,v 1.9 2017/07/02 16:41:33 joerg Exp $");
+__RCSID("$NetBSD: t_join.c,v 1.10 2020/01/29 13:40:23 kamil Exp $");
 
 #include <errno.h>
 #include <pthread.h>
@@ -153,7 +153,7 @@ threadfunc2(void *arg)
 
 	j = (uintptr_t)arg;
 
-	ATF_REQUIRE(pthread_attr_get_np(pthread_self(), &attr) == 0);
+	ATF_REQUIRE(pthread_getattr_np(pthread_self(), &attr) == 0);
 	ATF_REQUIRE(pthread_attr_getstacksize(&attr, &stacksize) == 0);
 	ATF_REQUIRE(stacksize == STACKSIZE * (j + 1));
 	ATF_REQUIRE(pthread_attr_getguardsize(&attr, &guardsize) == 0);

Reply via email to