Remove process_result lock since it is an invalid solution

TODO : synchronise process_result in another way
This commit is contained in:
2024-11-08 09:16:18 +00:00
parent d95894085b
commit 84fe637c7e
3 changed files with 4 additions and 20 deletions

View File

@@ -647,7 +647,6 @@ init_process_result (struct thread *t)
struct process_result *result = malloc (sizeof (struct process_result));
result->tid = t->tid;
result->exit_status = t->exit_status;
lock_init (&result->lock);
sema_init (&result->sema, 0);
t->result = result;
}

View File

@@ -37,7 +37,6 @@ 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 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. */