Use "rep; nop" inside a spin-lock loop on x86/x86-64
authorSimon Marlow <marlowsd@gmail.com>
Tue, 29 Sep 2009 13:07:22 +0000 (13:07 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 29 Sep 2009 13:07:22 +0000 (13:07 +0000)
commit0ee6cfbe62211121fc84a9d2e500f414f9e397f7
tree21e8c6ac9b4bd138bb847290b1d9233d11f65f38
parenteab91b9df6cd3eab7ba1b2ed0f0e649b314611bc
Use "rep; nop" inside a spin-lock loop on x86/x86-64
This helps on a hyperthreaded CPU by yielding to the other thread in a
spinlock loop.
includes/rts/SpinLock.h
includes/stg/SMP.h