>> Seemingly the best instruction to handle these bits is "atomic compare >> and exchange" (e.g. provided by the X86 CPU). > > It's actually not the best, because when it returns "did not match" > you have to loop and try again.
The supposedly "best" user space implementation for the X86 I found (in "Futexes are Tricky") uses both "atomic_compare_and_exchange" and "atomic_exchange" for the lock part and "atomic_dec" for the unlock part. -Michael _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev