This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-496-g7ac88e3


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  7ac88e383150ef3722bc58c541f261528bc25d22 (commit)
      from  6143dc8d006030f7235129015b988952072f4553 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7ac88e383150ef3722bc58c541f261528bc25d22

commit 7ac88e383150ef3722bc58c541f261528bc25d22
Author: David S. Miller <davem@davemloft.net>
Date:   Tue Mar 27 14:25:55 2012 -0700

    Fix nptl/tst-cond1{6,7,8}.c on 32-bit with many cpus.
    
    	* 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.

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index ad345f9..4622393 100644
--- a/nptl/ChangeLog
+++ b/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/nptl/tst-cond16.c b/nptl/tst-cond16.c
index 44b9863..8a35d95 100644
--- a/nptl/tst-cond16.c
+++ b/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/nptl/tst-cond18.c b/nptl/tst-cond18.c
index a1bb947..264c932 100644
--- a/nptl/tst-cond18.c
+++ b/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);

-----------------------------------------------------------------------

Summary of changes:
 nptl/ChangeLog    |    6 ++++++
 nptl/tst-cond16.c |   10 ++++++++--
 nptl/tst-cond18.c |   10 ++++++++--
 3 files changed, 22 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]