Commit Graph
7 Commits
Author SHA1 Message Date
Rich Felker afbcac6826 minor optimization to pthread_spin_trylock
use CAS instead of swap since it's lighter for most archs, and keep
EBUSY in the lock value so that the old value obtained by CAS can be
used directly as the return value for pthread_spin_trylock.
2015-04-22 03:24:37 -04:00
Rich Felker 7b1fb0c526 optimize spin lock not to dirty cache line while spinning 2015-04-22 03:16:50 -04:00
Rich Felker 2b71a4d1df fix more instances of old a_xchg (use new a_swap name) 2011-09-16 14:33:51 -04:00
Rich Felker 4106cdcd2d revert some more spin optimizations that turned out to be pessimizations 2011-03-28 22:36:55 -04:00
Rich Felker 117581ca69 fix broken spinlock due to miscompilation
actually this trick also seems to have made the uncontended case slower.
2011-03-28 22:22:54 -04:00
Rich Felker c322fe4e1a optimize spinlock spin 2011-03-24 23:05:17 -04:00
Rich Felker 0b44a0315b initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00