From cdcaec3c1e62b47fcd270df651cd0e343e46f0e7 Mon Sep 17 00:00:00 2001 From: bd Date: Mon, 10 Mar 2025 14:53:59 -0400 Subject: Update cli method signatures, add some getters to cache and storage --- src/storage/cache.cc | 11 ++++++++++- src/storage/storage.cc | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src/storage') 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, 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) { -- cgit v1.2.3