Fwd: [PATCH] spinlock spin with pause instruction

Mark Geisert mark@maxrnd.com
Sat Mar 12 06:25:00 GMT 2016

Václav Haisman wrote:
> Hi.
> I have noticed that Cygwin's spinlock goes into heavy sleeping code
> for each spin. It seems it would be a good idea to actually try to
> spin a bit first. There is this 'pause' instruction which let's the
> CPU make such busy loops be less busy. Here is a patch to do this.

I wanted to try out this patch but compilation is failing on the "unlikely" 
call.  Is that a macro that needs defining or something else?


More information about the Cygwin-patches mailing list