@paulmckrcu Happened to me, too. On rereading the RSEQ (restartable sequences)* documentation I find out you can set the RSEQ critical regions dynamically. So you can use it to do a wait-free hazard pointer protect that runs about 3x faster than the lock-free version. No loop w/ conditional branch instruction.
There's a couple of other ways to do wait-free hazard pointers but would require changes to retire logic.
@paulmckrcu Oh, sorry. I forgot to mention this is used w/ an asymmetric memory barriers, so it will always appear to be atomic to the retire thread which will do a membarrier() before polling the hazard pointers.
protect() is just a load and store apart from setting and clearing rseq_cs value for the restartable sequence.
@paulmckrcu I was making assumptions about how membarrier was implemented. If it was using RCU it would probably work, not so much for the other implementations.
Anyway, I have a wait-free epoch based reclamation implementation that is easier to work with and has the ability to control reclaim granularity.