Skip to content

Commit 58cc791

Browse files
committed
fix define for YIELDING
The intent seem to be to define this in one way, but previously it was then immediately overriding it for various architectures, causing a compiler warning.
1 parent 68ff451 commit 58cc791

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

common.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,15 +364,15 @@ typedef int blasint;
364364

365365
#if defined(OS_SUNOS)
366366
#define YIELDING thr_yield()
367-
#endif
368367

369-
#if defined(OS_WINDOWS)
368+
#elif defined(OS_WINDOWS)
370369
#if defined(_MSC_VER) && !defined(__clang__)
371370
#define YIELDING YieldProcessor()
372371
#else
373372
#define YIELDING SwitchToThread()
374373
#endif
375-
#endif
374+
375+
#else
376376

377377
#if defined(ARMV7) || defined(ARMV6) || defined(ARMV8) || defined(ARMV5)
378378
#define YIELDING __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop; \n");
@@ -406,6 +406,7 @@ typedef int blasint;
406406
#ifndef YIELDING
407407
#define YIELDING sched_yield()
408408
#endif
409+
#endif
409410

410411
/***
411412
To alloc job_t on heap or stack.

0 commit comments

Comments
 (0)