Florian Lohoff wrote: > My favourit would be to let the glibc on runtime decide whether > to use sysmips or ll/sc in the atomic test_and_set stuff. This would > lead to an common atom op in the userspace which is fast on ll/sc > cpus and gives much lesser performance penaltys in the sysmips case > than emulating ll/sc. > Do you have an idea how this run-time detection might be implemented? I am very curious. For example, how will you figure out the existence of ll/sc instruction? Is that a test which is a part of every process startup procedure? Or do you introduce a new syscall? Jun