mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 22:32:43 -04:00
Add pthread_np.h #include and initialize the pthread attribute on FreeBSD
Submitted by: pho
This commit is contained in:
parent
ff9d081d78
commit
ea74a0a240
1 changed files with 7 additions and 0 deletions
|
|
@ -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 a new issue