tsan: refactor MetaMap::GetAndLock interface
Don't lock the sync object inside of MetaMap methods. This has several advantages: - the new interface does not confuse thread-safety analysis so we can remove a bunch of NO_THREAD_SAFETY_ANALYSIS attributes - this allows use of scoped lock objects - this allows more flexibility, e.g. locking some other mutex between searching and locking the sync object Also prefix the methods with GetSync to be consistent with GetBlock method. Also make interface wrappers inlinable, otherwise we either end up with 2 copies of the method, or with an additional call. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D107256
Loading
Please sign in to comment