summaryrefslogtreecommitdiff
path: root/src/storage
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-10 14:53:59 -0400
committerbd <bdunahu@operationnull.com>2025-03-10 14:53:59 -0400
commitcdcaec3c1e62b47fcd270df651cd0e343e46f0e7 (patch)
treefc77cc22024b719f14e03e29e2bbd94b3eb645ca /src/storage
parent1f8b8babcfb383f1fb0281663561161061684206 (diff)
Update cli method signatures, add some getters to cache and storage
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/cache.cc11
-rw-r--r--src/storage/storage.cc2
2 files changed, 12 insertions, 1 deletions
diff --git a/src/storage/cache.cc b/src/storage/cache.cc
index 2031367..55c8cfa 100644
--- a/src/storage/cache.cc
+++ b/src/storage/cache.cc
@@ -16,7 +16,11 @@ Cache::Cache(Storage *lower, int delay)
this->wait_time = this->delay;
}
-Cache::~Cache() { delete this->data; }
+Cache::~Cache()
+{
+ delete this->lower;
+ delete this->data;
+}
Response Cache::write(Accessor accessor, signed int data, int address)
{
@@ -76,3 +80,8 @@ void Cache::fetch_resource(int expected)
this->is_waiting = (r == OK) ? false : true;
}
+
+std::array<std::array<int, 2>, L1_CACHE_SIZE> *Cache::get_meta()
+{
+ return &(this->meta);
+}
diff --git a/src/storage/storage.cc b/src/storage/storage.cc
index 61531d1..16ad63f 100644
--- a/src/storage/storage.cc
+++ b/src/storage/storage.cc
@@ -13,6 +13,8 @@ Storage::view(int base, int lines)
return ret;
}
+Storage *Storage::get_lower() { return this->lower; }
+
void Storage::resolve()
{
if (this->wait_time == 0) {