/*
* $Log$
+ * Revision 1.5 2004/06/07 15:57:12 aleph
+ * Add function prototypes
+ *
* Revision 1.4 2004/06/06 18:25:44 bernie
* Rename event macros to look like regular functions.
*
Event expire; /*!< Event to execute when the timer expires */
} Timer;
+/* Function protos */
extern void timer_init(void);
extern Timer *timer_new(void);
extern void timer_delete(Timer *timer);
extern void timer_udelay(utime_t utime);
INLINE time_t timer_gettick(void);
INLINE time_t timer_gettick_irq(void);
+INLINE void timer_set_event_softint(Timer* timer, Hook func, void* user_data);
+INLINE void timer_set_delay(Timer* timer, time_t delay);
+
+#if defined(CONFIG_KERN_SIGNALS) && CONFIG_KERN_SIGNALS
-#ifdef CONFIG_KERN_SIGNALS
/*! Set the timer so that it sends a signal when it expires */
+INLINE void timer_set_event_signal(Timer* timer, struct Process* proc, sigset_t sigs);
INLINE void timer_set_event_signal(Timer* timer, struct Process* proc, sigset_t sigs)
{
event_initSignal(&timer->expire, proc, sigs);
}
-#endif
+
+#endif /* CONFIG_KERN_SIGNALS */
/*! Set the timer so that it calls an user hook when it expires */
INLINE void timer_set_event_softint(Timer* timer, Hook func, void* user_data)
/*
* $Log$
+ * Revision 1.4 2004/06/07 15:58:00 aleph
+ * Add function prototypes
+ *
* Revision 1.3 2004/06/06 18:25:44 bernie
* Rename event macros to look like regular functions.
*
((e)->action = EVENT_IGNORE)
/*! Same as event_initNone(), but returns the initialized event */
+INLINE Event event_createNone(void);
INLINE Event event_createNone(void)
{
Event e;
((e)->action = EVENT_SOFTINT,(e)->Ev.Int.func = (f), (e)->Ev.Int.user_data = (u))
/*! Same as event_initSoftInt(), but returns the initialized event */
+INLINE Event event_createSoftInt(Hook func, void* user_data);
INLINE Event event_createSoftInt(Hook func, void* user_data)
{
Event e;
((e)->action = EVENT_SIGNAL,(e)->Ev.Sig.sig_proc = (p), (e)->Ev.Sig.sig_bit = (s))
/*! Same as event_initSignal(), but returns the initialized event */
+INLINE Event event_createSignal(struct Process* proc, sig_t bit);
INLINE Event event_createSignal(struct Process* proc, sig_t bit)
{
Event e;