Fix bug in userprog-merge where file writes were denied in the wrong thread

This commit is contained in:
Themis Demetriades
2024-11-12 16:22:32 +00:00
parent b0400693ae
commit d878dbc132
2 changed files with 9 additions and 1 deletions

View File

@@ -260,6 +260,7 @@ lock_acquire (struct lock *lock)
ASSERT (!lock_held_by_current_thread (lock));
struct thread *t = thread_current ();
ASSERT (t->waiting_lock == NULL);
enum intr_level old_level = intr_disable ();
if (lock->holder != NULL)