Op 9 mei 2012 21:30 schreef "K. Frank" <[email protected]> het volgende:
>
> Hi Gaby!
>
> On Wed, May 9, 2012 at 3:08 PM, Gabriel Dos Reis
> <[email protected]> wrote:
> > On Wed, May 9, 2012 at 2:06 PM, K. Frank <[email protected]> wrote:
> >
> >> However, as noted in my previous post, I have happily done some
> >> (limited) windows-api threading programming with Ruben's build
> >> (and also did the windows-api threading programming necessary
> >> to implement <thread>), all, I guess, with a gcc build built using
> >> --enable-threads=posix, so what then does --enable-threads=win32
> >> actually do?
> >
> > See TDM's build (which is --enable-threads=win32)
>
> I've used a couple of TDM's builds in the past (but I'm not sure I
> ever used it with threading, unless maybe a few simple test
> programs with Qt's QThread, and such).  But I haven't noticed
> any difference (other than, I would suspect, pthreads not working).
>
> So what does --enable-threads=win32 vs. --enable-threads=posix
> actually do?

It sets the source files that implement libgcc's internal thread functions.
Libstdc++ piggy-backs on these functions. Libgomp really needs a pthreads
api. There is a necessary part of the gthread Ali unimplemented for win32,
which results in the thread stuff being disabled in that case.

What you call in your code is completely orthogonal to GCC's threading
model, although libgcc will depend on the underlying winpthreads wrapper,
hence the dependency and performance penalty in *all* code.

Qthread, boost.thread all work regardless of what GCC uses internally.

Ruben

>
> > -- Gaby
>
> Thanks.
>
>
> K. Frank
>
>
------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to