main.c File Reference

#include <libc.h>
#include <core.h>
#include "timerreg.h"
#include "timervar.h"
#include "libtimer.h"
#include "libpic.h"

Defines

#define IO_TIMER1   0x040
#define IO_TIMER2   0x048
#define MAXTIMER   40
#define QUANTUM_DFLT   20000
#define STEP_DFLT   500
#define DIVISOR_DFLT   6000
#define TIMER_USAGE   "usage: timer [-uv][-d divisor][-Q quantum_usecs][-q quantum_ticks]"

Functions

u_int usecs_to_ticks (u_int frq, u_int usecs)
u_int ticks_to_usecs (u_int frq, u_int ticks)
void do_eoi (int irq)
void do_tick_except (int cpu)
void tick_except (int cpu)
void pit_init (u_int16_t divisor, u_int *freq)
void sys_timer_register (t_tcb *caller)
void sys_timer_unregister (t_tcb *caller)
void sys_timer_gfrq (t_tcb *caller)
void sys_timer_gettimeofday (t_tcb *caller)
void sys_timer_dump (t_tcb *caller)
void do_timersrv_syscall ()
void timersrv_syscall ()
void create_timersrv (int cpu)
u_int create_tick (int cpu)
void treat_dead (pid_t deadpid)
void signotify (int sig)
void timerd_main ()
pid_t create_timerd ()
int main (int argc, char **argv)

Variables

t_timer_info info
t_timer timers [MAXTIMER]
int lost_ticks [NB_CPUS]

Define Documentation

#define DIVISOR_DFLT   6000
 

#define IO_TIMER1   0x040
 

#define IO_TIMER2   0x048
 

#define MAXTIMER   40
 

#define QUANTUM_DFLT   20000
 

#define STEP_DFLT   500
 

#define TIMER_USAGE   "usage: timer [-uv][-d divisor][-Q quantum_usecs][-q quantum_ticks]"
 


Function Documentation

u_int create_tick int  cpu  ) 
 

allocate a task for tick

pid_t create_timerd  ) 
 

allocate a task for timer server

void create_timersrv int  cpu  ) 
 

allocate a task for timer server

void do_eoi int  irq  ) 
 

void do_tick_except int  cpu  ) 
 

void do_timersrv_syscall  ) 
 

int main int  argc,
char **  argv
 

void pit_init u_int16_t  divisor,
u_int freq
 

void signotify int  sig  ) 
 

void sys_timer_dump t_tcb caller  ) 
 

void sys_timer_gettimeofday t_tcb caller  ) 
 

void sys_timer_gfrq t_tcb caller  ) 
 

void sys_timer_register t_tcb caller  ) 
 

void sys_timer_unregister t_tcb caller  ) 
 

void tick_except int  cpu  ) 
 

u_int ticks_to_usecs u_int  frq,
u_int  ticks
 

void timerd_main  ) 
 

void timersrv_syscall  ) 
 

void treat_dead pid_t  deadpid  ) 
 

u_int usecs_to_ticks u_int  frq,
u_int  usecs
 


Variable Documentation

t_timer_info info
 

int lost_ticks[NB_CPUS]
 

t_timer timers[MAXTIMER]
 


Generated on Wed May 24 23:06:01 2006 for LSE/OS by  doxygen 1.4.6