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-barrier4.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'nptl/tst-barrier4.c') diff --git a/nptl/tst-barrier4.c b/nptl/tst-barrier4.c index a811feefa5..56ea044e0d 100644 --- a/nptl/tst-barrier4.c +++ b/nptl/tst-barrier4.c @@ -64,8 +64,21 @@ tf (void *arg) static int do_test (void) { + pthread_attr_t at; int cnt; + 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; + } + if (pthread_barrier_init (&b1, NULL, N) != 0) { puts ("1st barrier_init failed"); @@ -80,12 +93,18 @@ do_test (void) pthread_t th[N - 1]; for (cnt = 0; cnt < N - 1; ++cnt) - if (pthread_create (&th[cnt], NULL, tf, NULL) != 0) + if (pthread_create (&th[cnt], &at, tf, NULL) != 0) { puts ("pthread_create failed"); return 1; } + if (pthread_attr_destroy (&at) != 0) + { + puts ("attr_destroy failed"); + return 1; + } + tf (NULL); for (cnt = 0; cnt < N - 1; ++cnt) -- cgit v1.2.3