minix/kernel/clock.h
Tomas Hruby 0ac9b6d4cf SMP - trully idle APs
- any cpu can use smp_schedule() to tell another cpu to reschedule

- if an AP is idle, it turns off timer as there is nothing to
  preempt, no need to wakeup just to go back to sleep again

- if a cpu makes a process runnable on an idle cpu, it must wake it up
  to reschedule
2010-09-15 14:10:57 +00:00

21 lines
659 B
C

#ifndef __CLOCK_H__
#define __CLOCK_H__
#include "kernel.h"
#include "arch_clock.h"
_PROTOTYPE(int boot_cpu_init_timer, (unsigned freq));
_PROTOTYPE(int app_cpu_init_timer, (unsigned freq));
_PROTOTYPE(int timer_int_handler, (void));
_PROTOTYPE(int arch_init_local_timer, (unsigned freq));
/* sto p the local timer ticking */
_PROTOTYPE(void arch_stop_local_timer, (void));
/* let the time tick again with the original settings after it was stopped */
_PROTOTYPE(void arch_restart_local_timer, (void));
_PROTOTYPE(int arch_register_local_timer_handler, (irq_handler_t handler));
_PROTOTYPE( u64_t ms_2_cpu_time, (unsigned ms));
#endif /* __CLOCK_H__ */