minix/kernel/clock.h
Tomas Hruby a665ae3de1 Userspace scheduling - exporting stats
- contributed by Bjorn Swift

- adds process accounting, for example counting the number of messages
  sent, how often the process was preemted and how much time it spent
  in the run queue. These statistics, along with the current cpu load,
  are sent back to the user-space scheduler in the Out Of Quantum
  message.

- the user-space scheduler may choose to make use of these statistics
  when making scheduling decisions. For isntance the cpu load becomes
  especially useful when scheduling on multiple cores.
2010-09-19 15:52:12 +00:00

23 lines
694 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 init_local_timer, (unsigned freq));
/* sto p the local timer ticking */
_PROTOTYPE(void stop_local_timer, (void));
/* let the time tick again with the original settings after it was stopped */
_PROTOTYPE(void restart_local_timer, (void));
_PROTOTYPE(int register_local_timer_handler, (irq_handler_t handler));
_PROTOTYPE( u64_t ms_2_cpu_time, (unsigned ms));
_PROTOTYPE( unsigned cpu_time_2_ms, (u64_t cpu_time));
#endif /* __CLOCK_H__ */