diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-03-07 10:40:53 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-03-07 10:40:53 +0000 |
commit | 4d1a02efc1117763c67fe012642381e3106500cf (patch) | |
tree | 3e1416ebaf41ca04937a91e3b9e6ba72b057c752 /nptl/tst-barrier4.c | |
parent | ead327594300796f6e87293c5a53827b744eb93d (diff) | |
download | glibc-4d1a02efc1117763c67fe012642381e3106500cf.tar.gz |
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-barrier4.c')
-rw-r--r-- | nptl/tst-barrier4.c | 21 |
1 files changed, 20 insertions, 1 deletions
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) |