X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Finclude%2Fgeekos%2Ftimer.h;h=bf09464f27c8e6c4b8116fc7cae1b7afdd7b9957;hp=37dda144eae0fbc0a55c62377843c24cd19e993d;hb=eb7dda8d4a92a2e8d0c8f867c65317d756ca6c11;hpb=a1e11b02345601df1b136787ccbdb213c77bea32 diff --git a/palacios/include/geekos/timer.h b/palacios/include/geekos/timer.h index 37dda14..bf09464 100644 --- a/palacios/include/geekos/timer.h +++ b/palacios/include/geekos/timer.h @@ -1,7 +1,7 @@ /* * GeekOS timer interrupt support * Copyright (c) 2001, David H. Hovemeyer - * $Revision: 1.1 $ + * $Revision: 1.2 $ * * This is free software. You are permitted to use, * redistribute, and modify it as specified in the file "COPYING". @@ -14,11 +14,25 @@ extern volatile ulong_t g_numTicks; +typedef void (*timerCallback)(int); + void Init_Timer(void); void Micro_Delay(int us); +typedef struct { + int ticks; /* timer code decrements this */ + int id; /* unqiue id for this timer even */ + timerCallback callBack; /* Queue to wakeup on timer expire */ + int origTicks; +} timerEvent; + +int Start_Timer(int ticks, timerCallback); +int Get_Remaing_Timer_Ticks(int id); +int Cancel_Timer(int id); + + void Micro_Delay(int us); #endif /* GEEKOS_TIMER_H */