diff options
Diffstat (limited to 'src/mem/ruby/slicc_interface/AbstractCacheEntry.cc')
-rw-r--r-- | src/mem/ruby/slicc_interface/AbstractCacheEntry.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mem/ruby/slicc_interface/AbstractCacheEntry.cc b/src/mem/ruby/slicc_interface/AbstractCacheEntry.cc index 01fd3f522..416aea73b 100644 --- a/src/mem/ruby/slicc_interface/AbstractCacheEntry.cc +++ b/src/mem/ruby/slicc_interface/AbstractCacheEntry.cc @@ -28,6 +28,9 @@ #include "mem/ruby/slicc_interface/AbstractCacheEntry.hh" +#include "base/trace.hh" +#include "debug/RubyCache.hh" + AbstractCacheEntry::AbstractCacheEntry() { m_Permission = AccessPermission_NotPresent; @@ -48,3 +51,25 @@ AbstractCacheEntry::changePermission(AccessPermission new_perm) m_locked = -1; } } + +void +AbstractCacheEntry::setLocked(int context) +{ + DPRINTF(RubyCache, "Setting Lock for addr: %x to %d\n", m_Address, context); + m_locked = context; +} + +void +AbstractCacheEntry::clearLocked() +{ + DPRINTF(RubyCache, "Clear Lock for addr: %x\n", m_Address); + m_locked = -1; +} + +bool +AbstractCacheEntry::isLocked(int context) const +{ + DPRINTF(RubyCache, "Testing Lock for addr: %llx cur %d con %d\n", + m_Address, m_locked, context); + return m_locked == context; +} |