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 <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");
|
||||
|
|
Loading…
Reference in New Issue