Add pthread_np.h #include and initialize the pthread attribute on FreeBSD
Submitted by: pho
This commit is contained in:
parent
ff9d081d78
commit
ea74a0a240
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274574
@ -37,6 +37,10 @@ __RCSID("$NetBSD: t_join.c,v 1.8 2012/03/12 20:17:16 joerg Exp $");
|
||||
|
||||
#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));
|
||||
|
Loading…
Reference in New Issue
Block a user