[gomp] Fix GOMP_STACKSIZE=xxx GOMP_CPU_AFFINITY=yyy

Jakub Jelinek jakub@redhat.com
Thu Jun 7 20:23:00 GMT 2007


Hi!

A typo caused GOMP_STACKSIZE not being honored when GOMP_CPU_AFFINITY
is used.  Fixed thusly, committed to trunk.

2007-06-07  Jakub Jelinek  <jakub@redhat.com>

	* team.c (gomp_team_start): Fix setting up thread_attr
	stack size.

--- libgomp/team.c.jj	2007-05-04 09:20:50.000000000 +0200
+++ libgomp/team.c	2007-06-07 21:54:19.000000000 +0200
@@ -272,7 +272,7 @@ gomp_team_start (void (*fn) (void *), vo
       size_t stacksize;
       pthread_attr_init (&thread_attr);
       pthread_attr_setdetachstate (&thread_attr, PTHREAD_CREATE_DETACHED);
-      if (! pthread_attr_getstacksize (&thread_attr, &stacksize))
+      if (! pthread_attr_getstacksize (&gomp_thread_attr, &stacksize))
 	pthread_attr_setstacksize (&thread_attr, stacksize);
       attr = &thread_attr;
     }

	Jakub



More information about the Gcc-patches mailing list