|
|
|
@ -36,7 +36,11 @@ volatile int last_pid = -1;
|
|
|
|
|
clist_node_t *runqueues[SCHED_PRIO_LEVELS];
|
|
|
|
|
static uint32_t runqueue_bitcache = 0;
|
|
|
|
|
|
|
|
|
|
void sched_register_cb(void (*callback)(uint32_t, uint32_t));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if SCHEDSTATISTICS
|
|
|
|
|
static void (*sched_cb)(uint32_t timestamp, uint32_t value) = NULL;
|
|
|
|
|
schedstat pidlist[MAXTHREADS];
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -134,6 +138,11 @@ void sched_run() {
|
|
|
|
|
DEBUG("scheduler: done.\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if SCHEDSTATISTICS
|
|
|
|
|
void sched_register_cb(void (*callback)(uint32_t, uint32_t)) {
|
|
|
|
|
sched_cb = callback;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
void sched_set_status(tcb_t *process, unsigned int status) {
|
|
|
|
|
if (status & STATUS_ON_RUNQUEUE) {
|
|
|
|
|