4 #ifndef _WIN32 /* this is the linux version */
5 /* callout support, in <sys/callout.h> on FreeBSD */
7 * callout support on linux module is done using timers
9 #include <linux/timer.h>
11 #include <linux/sched.h> /* jiffies definition is here in 2.4 */
13 #define callout timer_list
15 callout_reset(struct callout *co, int ticks, void (*fn)(void *), void *arg)
17 co->expires = jiffies + ticks;
18 co->function = (void (*)(unsigned long))fn;
19 co->data = (unsigned long)arg;
24 #define callout_init(co, safe) init_timer(co)
25 #define callout_drain(co) del_timer(co)
26 #define callout_stop(co) del_timer(co)
28 #define CALLOUT_ACTIVE 0x0002 /* callout is currently active */
29 #define CALLOUT_MPSAFE 0x0008 /* callout handler is mp safe */
33 /* This is the windows part for callout support */
38 callout_reset(struct callout *co, int ticks, void (*fn)(void *), void *arg)
43 #define callout_init(co, safe)
44 #define callout_drain(co)
45 #define callout_stop(co)
50 /* add out timer to the kernel global timer list */
53 IN PDEVICE_OBJECT DeviceObject,
54 IN PIO_TIMER_ROUTINE TimerRoutine,
59 IoInitializeDpcRequest
60 http://dsrg.mff.cuni.cz/~ceres/sch/osy/text/ch04s01s01.php
61 example http://www.beyondlogic.org/interrupts/winnt_isr_dpc.htm
62 KeInitializeDpc IRQL: Any level
63 IoInitializeTimer IRQL: Passive level
68 IN PKDEFERRED_ROUTINE DeferredRoutine,
69 IN PVOID DeferredContext
71 #endif /* commented out */
73 #endif /* _SYS_SYSTM_H_ */