Spinlocks – how should one do on Linux what YieldProcessor is doing on Windows?

1 points by raiph ↗ HN
See http://irclog.perlgeek.de/perl6/2014-03-27#i_8503498 for the discussion so far which has started with:

Question for the masses: on Windows, if you're doing a spin-lock style thing, the YieldProcessor macro is defined so as to ensure that in a hyper-threading situation you don't clog up the execution units with your spinning (note it doesn't do a traditional yield and de-schedule you - it just doesn't get in the way of a hyperthread running on the same core). Does anybody know of an equivalent macro or function call on Linux and/or other systems?

0 comments

[ 5.0 ms ] story [ 19.0 ms ] thread

No comments yet.