-
- Downloads
Allow a scoped lockable object to acquire/release multiple locks.
Scoped lockable objects (mutex guards) are implemented as if it is a lock itself that is acquired upon construction and unlocked upon destruction. As it if course needs to be used to actually lock down something else (a mutex), it keeps track of this knowledge through its underlying mutex field in its FactEntry. The problem with this approach is that this only allows us to lock down a single mutex, so extend the code to use a vector of underlying mutexes. This, however, makes the code a bit more complex than necessary, so subclass FactEntry into LockableFactEntry and ScopedLockableFactEntry and move all the logic that differs between regular locks and scoped lockables into member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217016 91177308-0d34-0410-b5e6-96231b3b80d8
Loading
Please register or sign in to comment