]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Runs now fine on systems for which PTHREAD_STACK_MIN > 32768.
authorBart Van Assche <bvanassche@acm.org>
Tue, 13 Jan 2009 08:18:59 +0000 (08:18 +0000)
committerBart Van Assche <bvanassche@acm.org>
Tue, 13 Jan 2009 08:18:59 +0000 (08:18 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8946

drd/tests/matinv.c

index 7153beb09277310807b1c1bf383299f1ca2ff189..7ef4cb761601c170393a1a0898b7c6795b9f4bba 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <assert.h>
 #include <math.h>
+#include <limits.h>  // PTHREAD_STACK_MIN
 #include <pthread.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -236,8 +237,7 @@ static void gj(elem_t* const a, const int rows, const int cols)
   pthread_barrier_init(&b, 0, s_nthread);
 
   pthread_attr_init(&attr);
-  /* To do: replace the stack size argument by PTHREAD_STACK_MIN + 4096. */
-  err = pthread_attr_setstacksize(&attr, 32768);
+  err = pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN + 4096);
   assert(err == 0);
 
   for (i = 0; i < s_nthread; i++)