------- Comment #5 from dannysmith at users dot sourceforge dot net 2007-10-09 23:54 ------- (In reply to comment #2) > Created an attachment (id=14332) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14332&action=view) [edit] > Consistent use of _WIN32 define > Thats not quite right. ___MINGW32__ defines _WIN32 but doesn't have an intrin.h. I believe that is for MSVC compiler specific intrinsics. _MSC_VER is a MSVC compiler builtin define.
Also, Cygwin __may__ define _W32 (with -mwin32 switch) but still should use its own implementation of <sched.h> and sched_yield since it uses pthreads I'll attach what I'm using currently. Putting more #ifdef's into this file certainly doesn't make it any prettier. If wanted, I could prepare a patch that gets rid of *all* the non-GNU (Windows) stuff and just put a __MINGW32__ specific definition of a __gnu_parallel::sched_yield() into os_defines.h. FWIW, boost uses Sleep(1) -- not Sleep(0) -- for sched_yield() on windows, while cygwin use SwitchToThread() Dann\y -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33578