svn commit: r274574 - head/contrib/netbsd-tests/lib/libpthread

Garrett Cooper ngie at FreeBSD.org
Sun Nov 16 05:09:24 UTC 2014


Author: ngie
Date: Sun Nov 16 05:09:23 2014
New Revision: 274574
URL: https://svnweb.freebsd.org/changeset/base/274574

Log:
  Add pthread_np.h #include and initialize the pthread attribute on FreeBSD
  
  Submitted by: pho

Modified:
  head/contrib/netbsd-tests/lib/libpthread/t_join.c

Modified: head/contrib/netbsd-tests/lib/libpthread/t_join.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libpthread/t_join.c	Sun Nov 16 05:08:19 2014	(r274573)
+++ head/contrib/netbsd-tests/lib/libpthread/t_join.c	Sun Nov 16 05:09:23 2014	(r274574)
@@ -37,6 +37,10 @@ __RCSID("$NetBSD: t_join.c,v 1.8 2012/03
 
 #include <atf-c.h>
 
+#ifdef __FreeBSD__
+#include <pthread_np.h>
+#endif
+
 #include "h_common.h"
 
 #ifdef CHECK_STACK_ALIGNMENT
@@ -152,6 +156,9 @@ threadfunc2(void *arg)
 
 	j = (uintptr_t)arg;
 
+#ifdef __FreeBSD__
+	pthread_attr_init(&attr);
+#endif
 	ATF_REQUIRE(pthread_attr_get_np(pthread_self(), &attr) == 0);
 	ATF_REQUIRE(pthread_attr_getstacksize(&attr, &stacksize) == 0);
 	ATF_REQUIRE(stacksize == STACKSIZE * (j + 1));


More information about the svn-src-head mailing list