summaryrefslogtreecommitdiff
path: root/nptl/tst-fork1.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/tst-fork1.c')
-rw-r--r--nptl/tst-fork1.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/nptl/tst-fork1.c b/nptl/tst-fork1.c
index 56ffe50d9e..33c4ed84fe 100644
--- a/nptl/tst-fork1.c
+++ b/nptl/tst-fork1.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Roland McGrath <roland@redhat.com>, 2002.
@@ -71,6 +71,19 @@ main (void)
pthread_t th[N];
int i;
int result = 0;
+ pthread_attr_t at;
+
+ 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;
+ }
for (i = 0; i < N; ++i)
if (pthread_create (&th[i], NULL, thread_function,
@@ -80,6 +93,12 @@ main (void)
exit (1);
}
+ if (pthread_attr_destroy (&at) != 0)
+ {
+ puts ("attr_destroy failed");
+ return 1;
+ }
+
for (i = 0; i < N; ++i)
{
void *v;