Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Spinlocks – how should one do on Linux what YieldProcessor is doing on Windows?
1 point by raiph on March 27, 2014 | hide | past | favorite
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?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: