Refactor start_process to hold file system lock for less time

This commit is contained in:
Themis Demetriades
2024-11-14 16:05:15 +00:00
parent 3a46e0f73a
commit e4036c715f

View File

@@ -149,9 +149,9 @@ start_process (void *proc_start_data)
sema_up (&data->loaded);
thread_exit ();
}
thread_current ()->exec_file = exec_file;
file_deny_write (exec_file);
lock_release (&filesys_lock);
thread_current ()->exec_file = exec_file;
data->success = load (data->file_name, &if_.eip, &if_.esp);