summaryrefslogtreecommitdiff
path: root/nptl/tst-kill6.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/tst-kill6.c')
-rw-r--r--nptl/tst-kill6.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/nptl/tst-kill6.c b/nptl/tst-kill6.c
index 9956dcb9b8..26e82d98f0 100644
--- a/nptl/tst-kill6.c
+++ b/nptl/tst-kill6.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.
@@ -88,15 +88,35 @@ 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;
+ }
+
pthread_t th[N];
int i;
for (i = 0; i < N; ++i)
- if (pthread_create (&th[i], NULL, tf, NULL) != 0)
+ if (pthread_create (&th[i], &a, tf, NULL) != 0)
{
puts ("create failed");
exit (1);
}
+ if (pthread_attr_destroy (&a) != 0)
+ {
+ puts ("attr_destroy failed");
+ exit (1);
+ }
+
if (sem_init (&sem, 0, 0) != 0)
{
puts ("sem_init failed");