Skip to content

Commit fed16d6

Browse files
authored
Update common.h
1 parent 371663f commit fed16d6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

common.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -390,18 +390,19 @@ typedef int blasint;
390390
#define YIELDING
391391
#endif
392392

393+
#if defined(_MSC_VER) && !defined(__clang__)
394+
#undef YIELDING // MSVC doesn't support assembly code
395+
#define YIELDING YieldProcessor()
396+
#endif
397+
393398
#ifndef YIELDING
394399
#if defined(OS_SUNOS)
395400
#define YIELDING thr_yield()
396401

397402
#elif defined(OS_WINDOWS)
398-
# if defined(_MSC_VER) && !defined(__clang__)
399-
# define YIELDING YieldProcessor()
400-
# else
401-
# define YIELDING SwitchToThread()
402-
# endif
403+
#define YIELDING SwitchToThread()
403404

404-
#else
405+
#else // assume linux
405406
#define YIELDING sched_yield()
406407
#endif
407408
#endif

0 commit comments

Comments
 (0)