fix define for YIELDING
The intent is to define this as nop, but previously it was then immediately overriding it for various architectures, causing a compiler warning on Windows.
This commit is contained in:
@@ -362,18 +362,6 @@ typedef int blasint;
|
||||
#define MAX_CPU_NUMBER 2
|
||||
#endif
|
||||
|
||||
#if defined(OS_SUNOS)
|
||||
#define YIELDING thr_yield()
|
||||
#endif
|
||||
|
||||
#if defined(OS_WINDOWS)
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#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");
|
||||
#endif
|
||||
@@ -398,14 +386,25 @@ typedef int blasint;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#define YIELDING
|
||||
#endif
|
||||
|
||||
#ifndef YIELDING
|
||||
#if defined(OS_SUNOS)
|
||||
#define YIELDING thr_yield()
|
||||
|
||||
#elif defined(OS_WINDOWS)
|
||||
# if defined(_MSC_VER) && !defined(__clang__)
|
||||
# define YIELDING YieldProcessor()
|
||||
# else
|
||||
# define YIELDING SwitchToThread()
|
||||
# endif
|
||||
|
||||
#else
|
||||
#define YIELDING sched_yield()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/***
|
||||
To alloc job_t on heap or stack.
|
||||
|
||||
Reference in New Issue
Block a user