Implement initialization of new threads to track donation information, w/ S
This commit is contained in:
@@ -510,9 +510,13 @@ init_thread (struct thread *t, const char *name, int priority)
|
|||||||
t->status = THREAD_BLOCKED;
|
t->status = THREAD_BLOCKED;
|
||||||
strlcpy (t->name, name, sizeof t->name);
|
strlcpy (t->name, name, sizeof t->name);
|
||||||
t->stack = (uint8_t *) t + PGSIZE;
|
t->stack = (uint8_t *) t + PGSIZE;
|
||||||
t->priority = priority;
|
t->base_priority = priority;
|
||||||
t->magic = THREAD_MAGIC;
|
t->magic = THREAD_MAGIC;
|
||||||
|
|
||||||
|
list_init (&t->donors_list);
|
||||||
|
t->priority = t->base_priority;
|
||||||
|
t->waiting_lock = NULL;
|
||||||
|
|
||||||
old_level = intr_disable ();
|
old_level = intr_disable ();
|
||||||
list_push_back (&all_list, &t->allelem);
|
list_push_back (&all_list, &t->allelem);
|
||||||
intr_set_level (old_level);
|
intr_set_level (old_level);
|
||||||
|
|||||||
Reference in New Issue
Block a user