From 4d1a02efc1117763c67fe012642381e3106500cf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 7 Mar 2004 10:40:53 +0000 Subject: Update. 2004-03-07 Ulrich Drepper * 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. --- nptl/tst-tls3.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'nptl/tst-tls3.c') diff --git a/nptl/tst-tls3.c b/nptl/tst-tls3.c index 20ee3e30c2..8c2663bb04 100644 --- a/nptl/tst-tls3.c +++ b/nptl/tst-tls3.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2003. @@ -127,12 +127,26 @@ do_test (void) exit (1); } + pthread_attr_t a; + + if (pthread_attr_init (&a) != 0) + { + puts ("attr_init failed"); + exit (1); + } + + if (pthread_attr_setstacksize (&a, 1 * 1024 * 1024) != 0) + { + puts ("attr_setstacksize failed"); + return 1; + } + int r; for (r = 0; r < 10; ++r) { int i; for (i = 0; i < N; ++i) - if (pthread_create (&th[i], NULL, tf, cbs[i]) != 0) + if (pthread_create (&th[i], &a, tf, cbs[i]) != 0) { puts ("pthread_create failed"); exit (1); @@ -185,6 +199,12 @@ do_test (void) } } + if (pthread_attr_destroy (&a) != 0) + { + puts ("attr_destroy failed"); + exit (1); + } + return 0; #endif } -- cgit v1.2.3