Use atomic operations on TLS SharedMutex static data
Summary: [Folly] Use atomic operations on maybe-TLS `SharedMutex` static data via `atomic_ref`. The fields are thread-local on platforms which support thread-local fields, but global otherwise. When thread-local is supported, relaxed loads and stores should ordinarily have the same overhead as non-atomic loads and stores on most platforms. When thread-local is not supported and these fields are global, the concurrent atomic loads and stores will change to become defined behavior. Differential Revision: D19688867 fbshipit-source-id: 51873e12924ecff9d971316658fe71e2de18bdec
Showing
Please register or sign in to comment