by throwaway81523 · 4y ago · 0 comments
1) You are supposed to check the cpu number at the start and end of your critical section, to make sure it hasn't changed. But what if it has changed twice? There should be a "changed" flag in the struct, I'd think.
2) Does the single instruction commit not itself need a lock prefix or something similar? Futex has to do something like that unless I'm mistaken.
Actually, 3) if your cpu supports something like TSX (did Intel ever get that working right?), would you want to use that in preference to rseq?