summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMole Shang <[email protected]>2024-02-17 10:48:18 +0800
committerMole Shang <[email protected]>2024-02-17 10:50:50 +0800
commitd85aec2689c4250d0384904bdc11aa618c726bec (patch)
tree12ba2b8ccc85d6b27d1e642261465ffcae273971
parentedd523ffcb39c1c57944796fabfc71c70a10ce2e (diff)
downloadxv6-labs-thread.tar.gz
xv6-labs-thread.tar.bz2
xv6-labs-thread.zip
lab lock: update bcache lock namethread
-rw-r--r--kernel/bio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/bio.c b/kernel/bio.c
index a1f4474..153c2f2 100644
--- a/kernel/bio.c
+++ b/kernel/bio.c
@@ -52,8 +52,8 @@ binit(void)
// init each bucket
for (int i = 0; i < N_BUCKETS; i++) {
- static char lock_name[16];
- snprintf(lock_name, sizeof(lock_name), "bio.bucket.%d", i);
+ static char lock_name[20];
+ snprintf(lock_name, sizeof(lock_name), "bcache.bucket.%d", i);
initlock(&bcache.buckets[i].lock, lock_name);
bcache.buckets[i].head.prev = &bcache.buckets[i].head;
bcache.buckets[i].head.next = &bcache.buckets[i].head;