diff options
author | Mole Shang <[email protected]> | 2024-02-17 10:48:18 +0800 |
---|---|---|
committer | Mole Shang <[email protected]> | 2024-02-17 10:48:18 +0800 |
commit | 0193f78208d1a21bc8d68c17b4bc13ae30f322af (patch) | |
tree | 17bd1d12f6b2555f5aeed354e8f5511e8a980a92 | |
parent | 99015f3a985b2fd051606636743a2a2969b216e8 (diff) | |
download | xv6-labs-lock.tar.gz xv6-labs-lock.tar.bz2 xv6-labs-lock.zip |
lab lock: update bcache lock namelock
-rw-r--r-- | kernel/bio.c | 4 |
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; |