aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
diff options
context:
space:
mode:
authorEd Schouten <ed@80386.nl>2014-09-03 06:00:11 +0000
committerEd Schouten <ed@80386.nl>2014-09-03 06:00:11 +0000
commitca988749433e018cbd88c479d809e5c691ccec80 (patch)
tree1ae395d2e876519a61f9eca227f8db6077ecfd1f /llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
parent6cb92c206b8db221fa73db4d6054e994b67e584b (diff)
downloadllvm-ca988749433e018cbd88c479d809e5c691ccec80.zip
llvm-ca988749433e018cbd88c479d809e5c691ccec80.tar.gz
llvm-ca988749433e018cbd88c479d809e5c691ccec80.tar.bz2
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. llvm-svn: 217016
Diffstat (limited to 'llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions