mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
scheduler: continue rework
This commit is contained in:
@@ -45,6 +45,7 @@ thread_t *sched_newthread(void *ip, size_t kstacksize, int priority, proc_t *pro
|
||||
EVENT_INITHEADER(&thread->signals.waitpendingevent);
|
||||
memset(&thread->metrics, 0, sizeof(thread->metrics));
|
||||
thread->metrics.sleep_time_avg_us = 1; // to prevent a division by 0 when the thread first gets scheduled
|
||||
thread->class = THREAD_CLASS_TIMESHARE;
|
||||
|
||||
return thread;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user