Date: Tue, 14 Apr 2015 19:16:27 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: [PATCH] Use CAS instead of atomic swap to implement spinlock On Wed, Apr 15, 2015 at 01:44:53AM +0300, Alexander Monakov wrote: > This should allow spinning without constantly dirtying cache lines holding the > spinlock value. On architectures without native atomic swap, musl implement > a_swap by looping around a_cas. It won't help on x86, where all lock-prefixed ops perform both a read and a write even if they fail. But it should help in ll/sc style archs, and shouldn't hurt on x86. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.