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:
parent
c94fe71278
commit
5d3fc092e9
7
common.h
7
common.h
|
@ -82,7 +82,10 @@ extern "C" {
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#if !defined(_MSC_VER)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef OS_LINUX
|
#ifdef OS_LINUX
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
@ -307,8 +310,12 @@ typedef int blasint;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(OS_WINDOWS)
|
#if defined(OS_WINDOWS)
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define YIELDING YieldProcessor()
|
||||||
|
#else
|
||||||
#define YIELDING SwitchToThread()
|
#define YIELDING SwitchToThread()
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(ARMV7) || defined(ARMV6) || defined(ARMV8) || defined(ARMV5)
|
#if defined(ARMV7) || defined(ARMV6) || defined(ARMV8) || defined(ARMV5)
|
||||||
#define YIELDING asm volatile ("nop;nop;nop;nop;nop;nop;nop;nop; \n");
|
#define YIELDING asm volatile ("nop;nop;nop;nop;nop;nop;nop;nop; \n");
|
||||||
|
|
Loading…
Reference in New Issue