Added MSVC defines to common.h.

Don't have unistd.h in MSVC.

Chagned YIELDING to use the YeildProcessor macro.
This commit is contained in:
Hank Anderson 2015-02-11 11:10:45 -06:00
parent c94fe71278
commit 5d3fc092e9
1 changed files with 7 additions and 0 deletions

View File

@ -82,7 +82,10 @@ extern "C" {
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if !defined(_MSC_VER)
#include <unistd.h>
#endif
#ifdef OS_LINUX
#include <malloc.h>
@ -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");