fix define for YIELDING#5579
Conversation
|
Alternatively if the intent wasn't to override this, then I can swap the order of the declarations to define the architecture first. |
|
intention is to override, but I haven't checked which of the two is actually preferable on Windows - though I suspect it will be the asm no-op that currently "wins" amid the noisy warning. |
|
Alright, can change that. I see past issues now that indicate why it uses the spin lock with nops (#1881 (comment)) |
|
seems to be missing an |
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.
|
ah, yep, it was missing at the obvious place |
| #define YIELDING SwitchToThread() | ||
|
|
||
| #else | ||
| #else // assume linux |
There was a problem hiding this comment.
not only linux but *bsd as well - and probably other unixoid systems as well - this is just "assume sched_yield may work better with an unknown scheduler than doing nothing at all", and was historically what GotoBLAS/OpenBLAS would use on any host. perhaps simply leave out the comment ?
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.