tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 2*(void *) atomic swap?



On 30 Jul, 2015, at 11:23 , Taylor R Campbell <campbell+netbsd-tech-kern%mumble.net@localhost> wrote:

> - On amd64, use cmpxchg16b.

Using this would preclude running on some older machines including,
apparently, some Core 2 motherboards.  Is that okay?

http://www.pcworld.com/article/2058683/new-windows-8-1-requirements-strand-some-users-on-windows-8.html

> - On ll/sc machines, use ll/sc.

I know arm does double word ll/sc, but what else does?
I don't know of a way to use single register ll/sc to do an
atomic swap of two pointers.

If there is a way to do a conditional double-word swap for
all machines there should be a function to do that.  It enables
algorithms that are really difficult to do otherwise.

Dennis Ferguson


Home | Main Index | Thread Index | Old Index