Re[2]: [Gc] Calling ‘GC_INIT’ from a secondary thread

Ivan Maidanski ivmai at mail.ru
Sun Apr 17 07:11:13 PDT 2011


Hi,

NP, I think. Just prepare a patch.

There is only one problem: Solaris expects GC_INIT to be called from the main thread due to:

  /* These variables are used to cache ss_sp value for the primordial   */
  /* thread (it's better not to call thr_stksegment() twice for this    */
  /* thread - see JDK bug #4352906).                                    */

Is there a way to find out whether this is a primordial thread on not on Solaris? if yes then it would be easy to fix the problem on Solaris as well.
(I don't see any other multi-threaded platform that prevents calling GC_INIT from non-primordial threads.)

Regards.

Sun, 17 Apr 2011 16:01:02 +0200 ludo at gnu.org (Ludovic Courtès):

> Hi Ivan,
> 
> Ivan Maidanski <ivmai at mail.ru> writes:
> 
> > Fixed. Thanks.
> 
> I confirm it fixes the problem, thanks!
> 
> How about committing the code snippet I posted as a test case?
> 
> Ludo’.



More information about the Gc mailing list