summary refs log tree commit diff
path: root/nptl/tst-cond2.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-07 10:40:53 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-07 10:40:53 +0000
commit4d1a02efc1117763c67fe012642381e3106500cf (patch)
tree3e1416ebaf41ca04937a91e3b9e6ba72b057c752 /nptl/tst-cond2.c
parentead327594300796f6e87293c5a53827b744eb93d (diff)
downloadglibc-4d1a02efc1117763c67fe012642381e3106500cf.tar.gz
glibc-4d1a02efc1117763c67fe012642381e3106500cf.tar.xz
glibc-4d1a02efc1117763c67fe012642381e3106500cf.zip
Update.
2004-03-07  Ulrich Drepper  <drepper@redhat.com>

	* tst-once4.c: Remove unnecessary macro definition.

	* tst-mutex7.c (do_test): Limit thread stack size.
	* tst-once2.c (do_test): Likewise.
	* tst-tls3.c (do_test): Likewise.
	* tst-tls1.c (do_test): Likewise.
	* tst-signal3.c (do_test): Likewise.
	* tst-kill6.c (do_test): Likewise.
	* tst-key4.c (do_test): Likewise.
	* tst-join4.c (do_test): Likewise.
	* tst-fork1.c (do_test): Likewise.
	* tst-context1.c (do_test): Likewise.
	* tst-cond2.c (do_test): Likewise.
	* tst-cond10.c (do_test): Likewise.
	* tst-clock2.c (do_test): Likewise.
	* tst-cancel10.c (do_test): Likewise.
	* tst-basic2.c (do_test): Likewise.
	* tst-barrier4.c (do_test): Likewise.
Diffstat (limited to 'nptl/tst-cond2.c')
-rw-r--r--nptl/tst-cond2.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/nptl/tst-cond2.c b/nptl/tst-cond2.c
index 21bf817b13..36f0f29412 100644
--- a/nptl/tst-cond2.c
+++ b/nptl/tst-cond2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -86,11 +86,25 @@ do_test (void)
       exit (1);
     }
 
+  pthread_attr_t at;
+
+  if (pthread_attr_init (&at) != 0)
+    {
+      puts ("attr_init failed");
+      return 1;
+    }
+
+  if (pthread_attr_setstacksize (&at, 1 * 1024 * 1024) != 0)
+    {
+      puts ("attr_setstacksize failed");
+      return 1;
+    }
+
   for (i = 0; i < N; ++i)
     {
       printf ("create thread %d\n", i);
 
-      err = pthread_create (&th[i], NULL, tf, (void *) (long int) i);
+      err = pthread_create (&th[i], &at, tf, (void *) (long int) i);
       if (err != 0)
 	error (EXIT_FAILURE, err, "cannot create thread %d", i);
 
@@ -106,6 +120,12 @@ do_test (void)
 	}
     }
 
+  if (pthread_attr_destroy (&at) != 0)
+    {
+      puts ("attr_destroy failed");
+      return 1;
+    }
+
   puts ("get lock outselves");
 
   err = pthread_mutex_lock (&mut);