File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -362,18 +362,6 @@ typedef int blasint;
362362#define MAX_CPU_NUMBER 2
363363#endif
364364
365- #if defined(OS_SUNOS )
366- #define YIELDING thr_yield()
367- #endif
368-
369- #if defined(OS_WINDOWS )
370- #if defined(_MSC_VER ) && !defined(__clang__ )
371- #define YIELDING YieldProcessor()
372- #else
373- #define YIELDING SwitchToThread()
374- #endif
375- #endif
376-
377365#if defined(ARMV7 ) || defined(ARMV6 ) || defined(ARMV8 ) || defined(ARMV5 )
378366#define YIELDING __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop; \n");
379367#endif
@@ -398,14 +386,26 @@ typedef int blasint;
398386#endif
399387#endif
400388
401-
402389#ifdef __EMSCRIPTEN__
403390#define YIELDING
404391#endif
405392
393+ #if defined(_MSC_VER ) && !defined(__clang__ )
394+ #undef YIELDING // MSVC doesn't support assembly code
395+ #define YIELDING YieldProcessor()
396+ #endif
397+
406398#ifndef YIELDING
399+ #if defined(OS_SUNOS )
400+ #define YIELDING thr_yield()
401+
402+ #elif defined(OS_WINDOWS )
403+ #define YIELDING SwitchToThread()
404+
405+ #else // assume POSIX.1-2008
407406#define YIELDING sched_yield()
408407#endif
408+ #endif
409409
410410/***
411411To alloc job_t on heap or stack.
You can’t perform that action at this time.
0 commit comments