News for hackers. Stuff that matters.
Re:Storing Data in Pointers by ot on Monday November 27, 2023 @06:32AM (#38431088)
Don't you need 65k threads all contending on the same state for that to happen? Even if your process does have 65k threads, you'd need a pretty large critical section for all of them to be preempted in an unlucky point.

That said, it's better to rely on RCU/hazptr to solve ABA issues, but the extra bits are still useful to store state that can be CAS'd together with the pointer.

Re:Storing Data in Pointers by ot on Monday November 27, 2023 @03:02PM (#38437425)
Cannot edit anymore but I realized that my comment was wrong :) You just need 2 threads, as long as one is suspended long enough.