summaryrefslogtreecommitdiff
path: root/libc/nptl
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-03-28 22:24:59 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-03-28 22:24:59 +0000
commitf4b59fd62358f28e23bae2fa8756913fd758299a (patch)
treeaa78d41676b17cfae0c8cd3c77e0004a4c946a5e /libc/nptl
parent11e8a843c1be2bfbacb427ca25282e6979ebb48f (diff)
downloadeglibc2-f4b59fd62358f28e23bae2fa8756913fd758299a.tar.gz
Merge changes between r17700 and r17813 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@17814 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/nptl')
-rw-r--r--libc/nptl/ChangeLog6
-rw-r--r--libc/nptl/tst-cond16.c10
-rw-r--r--libc/nptl/tst-cond18.c10
3 files changed, 22 insertions, 4 deletions
diff --git a/libc/nptl/ChangeLog b/libc/nptl/ChangeLog
index ad345f950..4622393a4 100644
--- a/libc/nptl/ChangeLog
+++ b/libc/nptl/ChangeLog
@@ -1,3 +1,9 @@
+2012-03-27 David S. Miller <davem@davemloft.net>
+
+ * tst-cond16.c (do_test): Use a thread stack size which is either
+ PTHREAD_STACK_MIN or the page size, whichever is larger.
+ * tst-cond18.c (do_test): Likewise.
+
2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
diff --git a/libc/nptl/tst-cond16.c b/libc/nptl/tst-cond16.c
index 44b98634b..8a35d953c 100644
--- a/libc/nptl/tst-cond16.c
+++ b/libc/nptl/tst-cond16.c
@@ -76,9 +76,15 @@ do_test (void)
count *= 4;
pthread_t th[count];
- int i, ret;
+ pthread_attr_t attr;
+ int i, ret, sz;
+ pthread_attr_init (&attr);
+ sz = __getpagesize ();
+ if (sz < PTHREAD_STACK_MIN)
+ sz = PTHREAD_STACK_MIN;
+ pthread_attr_setstacksize (&attr, sz);
for (i = 0; i < count; ++i)
- if ((ret = pthread_create (&th[i], NULL, tf, NULL)) != 0)
+ if ((ret = pthread_create (&th[i], &attr, tf, NULL)) != 0)
{
errno = ret;
printf ("pthread_create %d failed: %m\n", i);
diff --git a/libc/nptl/tst-cond18.c b/libc/nptl/tst-cond18.c
index a1bb947ac..264c93238 100644
--- a/libc/nptl/tst-cond18.c
+++ b/libc/nptl/tst-cond18.c
@@ -87,10 +87,16 @@ do_test (void)
count *= 8;
pthread_t th[count + 1];
- int i, ret;
+ pthread_attr_t attr;
+ int i, ret, sz;
+ pthread_attr_init (&attr);
+ sz = __getpagesize ();
+ if (sz < PTHREAD_STACK_MIN)
+ sz = PTHREAD_STACK_MIN;
+ pthread_attr_setstacksize (&attr, sz);
for (i = 0; i <= count; ++i)
- if ((ret = pthread_create (&th[i], NULL, tf, (void *) (long) i)) != 0)
+ if ((ret = pthread_create (&th[i], &attr, tf, (void *) (long) i)) != 0)
{
errno = ret;
printf ("pthread_create %d failed: %m\n", i);