1 /* 2 ** Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 ** Distributed under the terms of the OpenBeOS License. 4 */ 5 #ifndef _KERNEL_TIMER_H 6 #define _KERNEL_TIMER_H 7 8 9 #include <KernelExport.h> 10 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 struct kernel_args; 17 18 #define B_TIMER_ACQUIRE_THREAD_LOCK 0x8000 19 #define B_TIMER_FLAGS B_TIMER_ACQUIRE_THREAD_LOCK 20 21 /* Timer info structure */ 22 struct timer_info { 23 char *name; 24 int (*get_priority)(void); 25 status_t (*set_hardware_timer)(bigtime_t timeout); 26 status_t (*clear_hardware_timer)(void); 27 status_t (*init)(struct kernel_args *args); 28 }; 29 30 typedef struct timer_info timer_info; 31 32 33 /* kernel functions */ 34 status_t timer_init(struct kernel_args *); 35 int32 timer_interrupt(void); 36 37 #ifdef __cplusplus 38 } 39 #endif 40 41 #endif /* _KERNEL_TIMER_H */ 42