Refactor start_process to hold file system lock for less time
This commit is contained in:
@@ -149,9 +149,9 @@ start_process (void *proc_start_data)
|
|||||||
sema_up (&data->loaded);
|
sema_up (&data->loaded);
|
||||||
thread_exit ();
|
thread_exit ();
|
||||||
}
|
}
|
||||||
thread_current ()->exec_file = exec_file;
|
|
||||||
file_deny_write (exec_file);
|
file_deny_write (exec_file);
|
||||||
lock_release (&filesys_lock);
|
lock_release (&filesys_lock);
|
||||||
|
thread_current ()->exec_file = exec_file;
|
||||||
|
|
||||||
data->success = load (data->file_name, &if_.eip, &if_.esp);
|
data->success = load (data->file_name, &if_.eip, &if_.esp);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user