Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


modified copyright tags
[palacios.git] / palacios / include / geekos / timer.h
1 /*
2  * GeekOS timer interrupt support
3  * Copyright (c) 2001, David H. Hovemeyer <daveho@cs.umd.edu>
4  * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu>
5  * (c) 2008, The V3VEE Project <http://www.v3vee.org> 
6  * $Revision: 1.2 $
7  * 
8  * This is free software.  You are permitted to use,
9  * redistribute, and modify it as specified in the file "COPYING".
10  */
11
12 #ifndef GEEKOS_TIMER_H
13 #define GEEKOS_TIMER_H
14
15 #define TIMER_IRQ 0
16
17 extern volatile ulong_t g_numTicks;
18
19 typedef void (*timerCallback)(int);
20
21 void Init_Timer(void);
22
23 void Micro_Delay(int us);
24
25
26 typedef struct {
27     int ticks;                           /* timer code decrements this */
28     int id;                              /* unqiue id for this timer even */
29     timerCallback callBack;              /* Queue to wakeup on timer expire */
30     int origTicks;
31 } timerEvent;
32
33 int Start_Timer(int ticks, timerCallback);
34 int Get_Remaing_Timer_Ticks(int id);
35 int Cancel_Timer(int id);
36
37
38 void Micro_Delay(int us);
39
40 #endif  /* GEEKOS_TIMER_H */