This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Thread model: simple and C


On 4 August 2010 13:56, Marcos Dione wrote:
>
> ? ?I'm cross-compiling an application to a platform whose SDK brings a gcc
> which reports 'Thread model: single'. even so, the platform implements a
> rudimentary thread support (a subset of posix), which leads me to think
> that it should be possible to use it in C programs.
>
> ? ?why? because the only reference to Thread model I could find in gcc's
> doc is in libstdc++'s manual[1] and no other useful reference about simple
> thread model.

Do you man single, not simple?
See the docs for --enable-threads at
http://gcc.gnu.org/install/configure.html

> ? ?so, in short: does a simple Thread model have any impact on C-only
> programs that could use threads? in particular, how it does impact
> Boehm's GC usage in a C-only program? if the impact is negative, would

IIUC GCC's thread model doesn't affect how you use threads in your own
program, only how GCC's libraries (e.g. the C++ and ObjC runtimes) use
threads.

> you say that the original gcc is compiled with the wrong flags, given that
> there is a bit of pthreads implementation in the platform?

If the configure command for GCC doesn't show --enable-threads=no or
--disable-threads then it probably means that configure tried to find
the functions needed for --enable-threads=posix and failed, so the
rudimentary support is not enough.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]