summaryrefslogtreecommitdiff
path: root/src/storage/cache.cc
diff options
context:
space:
mode:
authorbd <bdunaisky@umass.edu>2025-03-23 17:47:19 +0000
committerGitHub <noreply@github.com>2025-03-23 17:47:19 +0000
commitcef3753c74ec68ed0d99c1ae07af042dfc964344 (patch)
tree78c4981b2ad7db57bbe3d210655b577ad558018d /src/storage/cache.cc
parent4bad9ab29a5fa6c442a257974beb7daeaf91f046 (diff)
parent6ad8d012bc494f1119368c1466ac5d5d1bca2b96 (diff)
Merge pull request #31 from bdunahu/bdunahuer
Remove manual clock advancing / resolution from storage devices
Diffstat (limited to 'src/storage/cache.cc')
-rw-r--r--src/storage/cache.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/storage/cache.cc b/src/storage/cache.cc
index 8acdf08..d96efe2 100644
--- a/src/storage/cache.cc
+++ b/src/storage/cache.cc
@@ -88,7 +88,11 @@ Response Cache::is_access_cleared(Accessor accessor, int address)
if (this->is_waiting)
r = BLOCKED;
else if (this->wait_time == 0) {
+ this->requester = IDLE;
+ this->wait_time = delay;
r = OK;
+ } else {
+ --this->wait_time;
}
}
return r;