Implement process_wait.
This commit is contained in:
@@ -36,9 +36,8 @@ struct process_result
|
||||
{
|
||||
tid_t tid; /* The tid of the child process. */
|
||||
int exit_status; /* The exit status of the child process. Initially set to
|
||||
-1, then to 0 when parent dies, or to exit_status when
|
||||
child dies (whichever happens first). */
|
||||
struct lock lock; /* Lock to synchronise access to the exit_status. */
|
||||
-1, then to exit_status when child dies. */
|
||||
struct lock lock; /* Lock to synchronise access to the status and sema. */
|
||||
struct semaphore sema; /* Semaphore to signal the parent that the exit_status
|
||||
has been set. */
|
||||
struct list_elem elem; /* List element for the parent's children list. */
|
||||
|
||||
Reference in New Issue
Block a user