This patch moves more includes (most of them, to tell the truth) to common/include directory. This completes the list of includes needed to compile current trunk with the new libc (but to do that you need more patches in queue). This patch also contains some modification (for compilation with new headers) to the common includes under __NBSD_LIBC, the define used in mk script to specialize compilation with new includes.
52 lines
1.2 KiB
C
52 lines
1.2 KiB
C
#ifndef _DDEKIT_TIMER_H
|
|
#define _DDEKIT_TIMER_H
|
|
|
|
#include <ddekit/ddekit.h>
|
|
#include <ddekit/thread.h>
|
|
|
|
/** \defgroup DDEKit_timer
|
|
*
|
|
* Timer subsystem
|
|
*
|
|
* DDEKit provides a generic timer implementation that enables users
|
|
* to execute a function with some arguments after a certain period
|
|
* of time. DDEKit therefore starts a timer thread that executes these
|
|
* functions and keeps track of the currently running timers.
|
|
*/
|
|
|
|
/** Add a timer event. After the absolute timeout has expired, function fn
|
|
* is called with args as arguments.
|
|
*
|
|
* \ingroup DDEKit_timer
|
|
*
|
|
* \return >=0 valid timer ID
|
|
* \return < 0 error
|
|
*/
|
|
_PROTOTYPE( int ddekit_add_timer,
|
|
(void (*fn)(void *), void *args, unsigned long timeout));
|
|
|
|
/** Delete timer with the corresponding timer id.
|
|
*
|
|
* \ingroup DDEKit_timer
|
|
*/
|
|
_PROTOTYPE( int ddekit_del_timer, (int timer));
|
|
|
|
/** Check whether a timer is pending
|
|
*
|
|
* \ingroup DDEKit_timer
|
|
*
|
|
* Linux needs this.
|
|
*/
|
|
_PROTOTYPE( int ddekit_timer_pending, (int timer));
|
|
|
|
/** Initialization function, startup timer thread
|
|
*
|
|
* \ingroup DDEKit_timer
|
|
*/
|
|
_PROTOTYPE( void ddekit_init_timers, (void));
|
|
|
|
/** Get the timer thread.
|
|
*/
|
|
_PROTOTYPE( ddekit_thread_t *ddekit_get_timer_thread, (void));
|
|
|
|
#endif
|