Merge code refactors into main branch #16

Merged
ed1223 merged 8 commits from merged-complete into master 2024-10-24 22:15:25 +00:00
3 changed files with 41 additions and 36 deletions
Showing only changes of commit 74657bbf9c - Show all commits

View File

@@ -634,17 +634,16 @@ init_thread (struct thread *t, const char *name, int nice, int priority,
t->status = THREAD_BLOCKED;
strlcpy (t->name, name, sizeof t->name);
t->stack = (uint8_t *) t + PGSIZE;
t->magic = THREAD_MAGIC;
t->base_priority = priority;
list_init (&t->donors_list);
t->waiting_lock = NULL;
t->nice = nice;
t->recent_cpu = recent_cpu;
t->base_priority = priority;
t->magic = THREAD_MAGIC;
list_init (&t->donors_list);
t->priority = thread_mlfqs ? calculate_bsd_priority (recent_cpu, nice) : t->base_priority;
t->waiting_lock = NULL;
t->priority = thread_mlfqs ? calculate_bsd_priority (recent_cpu, nice)
: t->base_priority;
old_level = intr_disable ();
list_push_back (&all_list, &t->allelem);