diff options
author | bd <bdunahu@operationnull.com> | 2025-03-10 14:53:59 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-10 14:53:59 -0400 |
commit | 486d18df5ca93e043fdd14fac1d22b5fe40fb6f6 (patch) | |
tree | fc77cc22024b719f14e03e29e2bbd94b3eb645ca /src/storage | |
parent | d0ec568e4f063fd1c85087582283f3511e0a12ec (diff) |
Update cli method signatures, add some getters to cache and storage
Diffstat (limited to 'src/storage')
-rw-r--r-- | src/storage/cache.cc | 11 | ||||
-rw-r--r-- | src/storage/storage.cc | 2 |
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) { |