From 5d3fc092e9eae1982ae9947066546131c57f2fbe Mon Sep 17 00:00:00 2001 From: Hank Anderson Date: Wed, 11 Feb 2015 11:10:45 -0600 Subject: [PATCH] Added MSVC defines to common.h. Don't have unistd.h in MSVC. Chagned YIELDING to use the YeildProcessor macro. --- common.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common.h b/common.h index fe2083469..0761f5536 100644 --- a/common.h +++ b/common.h @@ -82,7 +82,10 @@ extern "C" { #include #include #include + +#if !defined(_MSC_VER) #include +#endif #ifdef OS_LINUX #include @@ -307,8 +310,12 @@ typedef int blasint; #endif #if defined(OS_WINDOWS) +#ifdef _MSC_VER +#define YIELDING YieldProcessor() +#else #define YIELDING SwitchToThread() #endif +#endif #if defined(ARMV7) || defined(ARMV6) || defined(ARMV8) || defined(ARMV5) #define YIELDING asm volatile ("nop;nop;nop;nop;nop;nop;nop;nop; \n");