Hello Jim!

On Wed, Jan 19, 2011 at 4:22 AM, Jim Michaels <[email protected]> wrote:
> why do you say that you thiik it will only work with vista?

First, because of comments in a earlier discussion (not this thread)
on this list (from memory, the mingw64 list).  Second, from my
superficial glances at msdn.

> what
> win32/platform sdk functions or data structures are you using that are
> vista-specific?

The big one is condition variables.

So this would mean the windows typedefs:

   CONDITION_VARIABLE, *PCONDITION_VARIABLE

and the entry points for the windows api functions:

   InitializeConditionVariable
   SleepConditionVariableCS

My understanding is that windows has condition variables only
on vista and later.

> I happen to have the 2000 version of the MSDN (unlike the current version,
> it reports properly on older versions of windows), and I can look these up
> for you to make sure.

If you could check the condition variable stuff, and it turns out
to be supported pre-vista (e.g., xp), I would be happy to poke
through my code and see if there in anything else suspicious.
But, from memory, condition variables were the problem.

> and I have an XP machine to test things on if you
> have a test program for me to execute.  I could also possibly test on
> windows 98 SE.  beginthreadex existed in windows 95.

If the condition variables look promising, your offer to test on
xp would be very helpful.  (I only have windows 7.)

> I would be glad to help you out.  Microsoft is really shooting themselves in
> the foot and doing developers a disfavor by doing revisionist history.  I
> think I am going to keep my old MSDN.

Please note, even if the native-windows implementation of
std::thread doesn't work, I still think you can use std::thread
with mingw pre-vista, by using the pthreads-win32 implementation.

I have std::thread working with mingw using pthreads.  It turns
out that no real implementation work was required -- only a few
minor tweaks to the code were necessary.  I've only tested it
on windows 7, but it is my (untested) understanding that it should
work on things like xp, and maybe even 95/98.

Let me know if there is anything more I can tell you, or do
to help.

Best.


K. Frank

> ________________________________
> From: K. Frank <[email protected]>
> To: MinGW Users List <[email protected]>; mingw64
> <[email protected]>
> Sent: Mon, November 1, 2010 8:05:50 PM
> Subject: Re: [Mingw-w64-public] [Mingw-users] Experimental mingw32 /
> mingw-w64 support for std::thread
>
> Hello All -
>
> I have completed my draft native-windows support for mingw's std::thread.
>
> On Wed, Oct 20, 2010 at 12:48 AM, K. Frank <[email protected]> wrote:
>> ...
>> I have an update on timed mutex waits for mingw support for std::thread.
>>
>> On Tue, Oct 12, 2010 at 10:50 PM, K. Frank <[email protected]> wrote:
>>> ...
>>> I have put together a first cut at mingw support for std::thread.
>>> ...
>
> I've developed and tested the implementation on windows 7, and I expect
> that it will only work on windows vista and above.
>
> All of the basic threading and synchronization functionality seems to  be
> working.  I haven't tried everything, but I have written test programs that
> exercise the core functionality, and have run some of the gnu std::thread
> test suite by hand.  I don't know of anything that doesn't work.
>
> (With one exception: With mingw32 / g++ 4.5.0, I cannot instantiate a
> std::future, but I can with mingw-w64 / g++ 4.5.2.  I am guessing that
> this is a 4.5.0 issue, rather than a mingw32-specific issue, or a problem
> with the threading implementation.)
>
> To summarize what was stated in an earlier post, this implementation
> provides wrapper code that translates the pthreads-like gthreads interface
> used by gnu's std::thread into native windows calls using native windows
> threads (i.e., _beginthreadex), critical sections, and condition variables.
> (The use of native windows condition variables is the primary reason this
> implementation is limited to windows vista and above.)
>
> Any suggestions about how to integrate this into the mingw32 and mingw-w64
> distributions or help with testing would we appreciated.
>
> In the meantime my focus will be playing around with std::thread (which I
> don't really know how to use yet), rather than tweaking the implementation.
> (From what I've seen so far of std::thread, it looks pretty good.  It's
> worth a
> look, if you like playing around with that sort of thing.  I believe
> that std::thread
> will work out of the box with recent linux versions of gcc.)
>
> Thanks.
>
> K. Frank
> ...

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to