Update copyright year range in all GDB files
[external/binutils.git] / gdb / testsuite / gdb.threads / manythreads.c
index 1eb2cab..9ff73de 100644 (file)
@@ -1,5 +1,5 @@
 /* Manythreads test program.
-   Copyright 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright 2004-2018 Free Software Foundation, Inc.
 
    Written by Jeff Johnston <jjohnstn@redhat.com> 
    Contributed by Red Hat
@@ -20,7 +20,9 @@
    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 *
@@ -28,7 +30,9 @@ thread_function (void *arg)
 {
   int x = * (int *) arg;
 
+#ifdef DEBUG
   printf ("Thread <%d> executing\n", x);
+#endif /* DEBUG */
 
   return NULL;
 }
@@ -44,7 +48,7 @@ main (int argc, char **argv)
   pthread_attr_init (&attr);
 
 #ifdef PTHREAD_STACK_MIN
-  pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
+  pthread_attr_setstacksize (&attr, 2*PTHREAD_STACK_MIN);
 #endif
 
   /* Create a ton of quick-executing threads, then wait for them to