OpenMP options and threading models
Tom Tromey
tromey@redhat.com
Fri Oct 22 21:21:00 GMT 2004
>>>>> "Mark" == Mark Mitchell <mark@codesourcery.com> writes:
>> So, IMO, this should be the default. Adding some other option may
>> make sense depending on the needs of OpenMP.
Mark> I wouldn't commit the OpenMP library to working with the gthr.h
Mark> stuff -- but it would be nice if it did, I suppose.
FWIW, libgcj doesn't use the gthr.h code at all. It just recognizes
how gcc as a whole was configured and uses the "same" thing, with a
parallel implementation. There were a few reasons we didn't use
gthr.h at the time this was initially written, but the one that
remains relevant is that this approach lets the runtime have some
freedom about what it actually does. For instance, we use thin locks
and promote to platform (e.g., posix) locks on contention.
For us the important bit is having one configuration thing to tweak
(since most users just want to say "posix threads" or "win32 threads"
and have that have some reasonable meaning everywhere), and having
some kind of link-time sanity, so that if libgcc needs -lpthread, we
don't then need some other random library for libgcj.
Tom
More information about the Gcc
mailing list