/* Manythreads test program.
- Copyright 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright 2004-2018 Free Software Foundation, Inc.
Written by Jeff Johnston <jjohnstn@redhat.com>
Contributed by Red Hat
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <pthread.h>
+#ifdef DEBUG
#include <stdio.h>
+#endif
#include <limits.h>
void *
{
int x = * (int *) arg;
+#ifdef DEBUG
printf ("Thread <%d> executing\n", x);
+#endif /* DEBUG */
return NULL;
}
int i, j;
pthread_attr_init (&attr);
- pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
+
+#ifdef PTHREAD_STACK_MIN
+ pthread_attr_setstacksize (&attr, 2*PTHREAD_STACK_MIN);
+#endif
/* Create a ton of quick-executing threads, then wait for them to
complete. */