mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
scheduler: begin rework
This commit is contained in:
@@ -23,4 +23,8 @@ void sched_reschedule_on_cpu(struct cpu_t *cpu, bool target);
|
||||
void sched_sleep_us(size_t us);
|
||||
int sched_yield();
|
||||
|
||||
void sched_thread_running_callback(thread_t *thread);
|
||||
void sched_thread_stopping_callback(thread_t *thread, bool sleeping);
|
||||
void sched_thread_wakeup_callback(thread_t *thread);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -52,6 +52,13 @@ typedef struct thread_t {
|
||||
bool hasreturnmask;
|
||||
bool stopped;
|
||||
} signals;
|
||||
struct {
|
||||
int interactivity_score;
|
||||
time_t sleep_time_avg_us;
|
||||
time_t run_time_avg_us;
|
||||
timespec_t sleep_start;
|
||||
timespec_t run_start;
|
||||
} metrics;
|
||||
} thread_t;
|
||||
|
||||
__attribute__((noreturn)) void sched_threadexit();
|
||||
|
||||
Reference in New Issue
Block a user