2003-05-03 20:03:26 +04:00
|
|
|
/*
|
2004-03-14 21:03:18 +03:00
|
|
|
** Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
2003-05-03 20:03:26 +04:00
|
|
|
** Distributed under the terms of the OpenBeOS License.
|
|
|
|
*/
|
2002-07-09 16:24:59 +04:00
|
|
|
#ifndef _KERNEL_TIMER_H
|
|
|
|
#define _KERNEL_TIMER_H
|
|
|
|
|
2002-07-21 02:53:23 +04:00
|
|
|
|
2002-10-26 20:13:36 +04:00
|
|
|
#include <KernelExport.h>
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
|
2002-07-21 02:53:23 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
2003-05-03 20:03:26 +04:00
|
|
|
#endif
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2004-03-14 21:03:18 +03:00
|
|
|
struct kernel_args;
|
|
|
|
|
2008-04-22 19:29:22 +04:00
|
|
|
#define B_TIMER_ACQUIRE_THREAD_LOCK 0x8000
|
|
|
|
#define B_TIMER_FLAGS B_TIMER_ACQUIRE_THREAD_LOCK
|
|
|
|
|
2008-07-06 00:40:06 +04:00
|
|
|
/* Timer info structure */
|
|
|
|
struct timer_info {
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
2003-05-03 20:03:26 +04:00
|
|
|
/* kernel functions */
|
2004-03-14 21:03:18 +03:00
|
|
|
status_t timer_init(struct kernel_args *);
|
|
|
|
int32 timer_interrupt(void);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-07-21 03:06:32 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
2003-05-03 20:03:26 +04:00
|
|
|
#endif
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2003-05-03 20:03:26 +04:00
|
|
|
#endif /* _KERNEL_TIMER_H */
|