** Copyright 2003-2004, Axel DΓΆrfler, axeld@pinc-software.de. All rights reserved.
** Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_TIMER_H
#define _KERNEL_TIMER_H
#include <KernelExport.h>
#ifdef __cplusplus
extern "C" {
#endif
struct kernel_args;
#define B_TIMER_REAL_TIME_BASE 0x2000
#define B_TIMER_USE_TIMER_STRUCT_TIMES 0x4000
#define B_TIMER_FLAGS \
(B_TIMER_USE_TIMER_STRUCT_TIMES | B_TIMER_REAL_TIME_BASE)
struct timer_info {
const char *name;
int (*get_priority)(void);
status_t (*set_hardware_timer)(bigtime_t timeout);
status_t (*clear_hardware_timer)(void);
status_t (*init)(struct kernel_args *args);
};
typedef struct timer_info timer_info;
status_t timer_init(struct kernel_args *);
void timer_init_post_rtc(void);
void timer_real_time_clock_changed();
int32 timer_interrupt(void);
#ifdef __cplusplus
}
#endif
#endif