Hi, On 2022-10-27 19:44:13 -0400, Tom Lane wrote: > Turns out they have a pretty cute workaround for it, on HPPA and a couple of > other atomics-less arches they still support. They've written short > sequences that have the effect of CAS and are designed to store to memory > only at the end. To make them atomic, libc asks the kernel "pretty please, > if you happen to notice that I've been interrupted in the PC range from here > to here, would you reset the PC to the start of that before returning?".
That sounds roughly like restartable sequences in the linux world - a pretty cool feature. It's too bad that it's not yet available everywhere, it does make some things a lot easier [to make performant]. > Anyway, I think the big picture here is that nowadays we could > assume that the platform offers this feature. Agreed. Greetings, Andres Freund