Guys/gals, I was thinking about doing some work here and I noticed there's no operation that allows a atomic compare/exchange based on the last bit.
There should be an instruction that allows you to do an update of a 64 bit value only if the last bit is a 0.
The idea here is you would be able to swap pointer values atomically only if they were unlocked.
2^63 is such a huge number, it is sufficient to represent practically all the data in the universe. If we allowed an atomic compare exchange on the last bit, or something like check if the last bit is 0, allow the write, otherwise don't, it would make programming a lot easier.
Thanks!
reply