diff options
Diffstat (limited to 'nptl/tst-key4.c')
-rw-r--r-- | nptl/tst-key4.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/nptl/tst-key4.c b/nptl/tst-key4.c index 7e9bfddcca..0a5b448e50 100644 --- a/nptl/tst-key4.c +++ b/nptl/tst-key4.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 <drepper@redhat.com>, 2003. @@ -75,6 +75,20 @@ 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; + } + for (i = 0; i < 10; ++i) { int j; @@ -109,6 +123,12 @@ do_test (void) } } + if (pthread_attr_destroy (&a) != 0) + { + puts ("attr_destroy failed"); + exit (1); + } + return 0; } |