wangpc-pp wrote: > lr/sc builtins are extremely fragile: there's no reasonable way for the > compiler to guarantee that the sc is placed in such a way that it will > eventually succeed.
I think the user should have enough knowledges about lr/sc to make the logic reasonable. If we don't provide these intrinsics, the user who wants to implement custom locks will use inline assemly instead. > (The equivalent intrinsics do exist on ARM, but ARM has significantly > stronger guarantees here. Even then, it's not completely reliable.) I don't know much about there intrinsics on ARM, what are the `stronger guarantees`? https://github.com/llvm/llvm-project/pull/94578 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits