[Gc] threads under android

Marcos_David.Dione at sophia.inria.fr Marcos_David.Dione at sophia.inria.fr
Tue Jan 12 14:06:08 PST 2010


On Tue, January 12, 2010 8:42 pm, Boehm, Hans wrote:
> Gcc defaults to single-threaded behavior.  (Seems a bit dubious to me, but
> ...)  My impression is that "single" mostly means that some C++ template
> libraries aren't thread-safe by default.  I think gcc's code generation is
> otherwise fairly independent of the threading model.  (Which is part
> feature, and arguably part bug.)
>
> Since gcc defaults to thread-unsafe behavior, I think the collector should
> as well.  This is easy enough to override if you want to use the provided
> pthreads implementation, except that I'm not sure about the state of
> pthread-on-Android support in the collector.
>
> In any case, I don't see an argument for gcc and GC having different
> defaults with respect to thread support, even if thread support exists and
> gcc doesn't use it by default.  In that case, it's likely that some of the
> default libraries will also not be thread-safe (since they were probably
> compiled with the default gcc and hence a thread-unsafe C++ library).  Why
> should the GC be any different?  If you need threads on such a platform, I
> think you need to make sure you're using specially-compiled thread-safe
> libraries.

  but all this applies to c++, or so it seems from your description. what
impact it would have on a all C project like bigloo and hop?

-- 
Lic. Marcos Dione
Engineer Expert - Hop Project
http://hop.inria.fr/
INRIA Sophia Antipolis - Méditerranée
Phone: +33 (0)4 92 38 79 67


More information about the Gc mailing list