Date: Sun, 16 Nov 2014 05:09:24 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274574 - head/contrib/netbsd-tests/lib/libpthread Message-ID: <201411160509.sAG59Os9055813@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411160509.sAG59Os9055813>