Main Page | Data Structures | File List | Globals | Related Pages

timer.h

Go to the documentation of this file.
00001 
00011 #ifndef __KERN_TIMER_H__
00012 #define __KERN_TIMER_H__
00013 
00014 #include <list.h>
00015 #include <scheduler.h>
00016 
00017 #define TIMER_HZ 100
00018 
00019 /* a deadline timer that signals a resource upon expiration */
00020 typedef struct
00021 {
00022         /* the list of timers waiting to expire */
00023         ListNode timerList;
00024         /* the tick deadline of the timer */
00025         unsigned int deadline;
00026         /* resource for threads waiting on the timer */
00027         Resource sleepResource;
00028 } Timer;
00029 
00037 extern int timer_initialize (void);
00038 
00045 extern unsigned int get_ticks (void);
00046 
00058 extern Timer * timer_create (unsigned int delta);
00067 extern void timer_activate (Timer * timer);
00076 extern void timer_destroy (Timer * timer);
00077  
00078 #endif /* __KERN_TIMER_H__ */
00079 
00080 

Generated on Fri Apr 9 21:59:16 2004 for 15-410 Project 3 by doxygen 1.3.2