xref: /haiku/headers/private/firewire/timer.h (revision bb5ea4eb08fc2251cc8b4ae6ce3527330f28e242)
1 /* Realtek RTL8169 Family Driver
2  * Copyright (C) 2004 Marcus Overhagen <marcus@overhagen.de>. All rights reserved.
3  *
4  * Permission to use, copy, modify and distribute this software and its
5  * documentation for any purpose and without fee is hereby granted, provided
6  * that the above copyright notice appear in all copies, and that both the
7  * copyright notice and this permission notice appear in supporting documentation.
8  *
9  * Marcus Overhagen makes no representations about the suitability of this software
10  * for any purpose. It is provided "as is" without express or implied warranty.
11  *
12  * MARCUS OVERHAGEN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
13  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL MARCUS
14  * OVERHAGEN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
15  * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
17  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 #ifndef __TIMER_H
20 #define __TIMER_H
21 
22 #include <KernelExport.h>
23 
24 // Since the BeOS kernel timers are executed in interrupt context,
25 // a new timer has been created. The timers are executed in thread
26 // context, and are passed a cookie.
27 
28 typedef int32 timer_id;
29 
30 typedef void (*timer_function)(void *cookie);
31 
32 // create_timer() can be called from interrupt context.
33 // Only up to 8 concurrent timers are supported.
34 // Flags can be one of B_ONE_SHOT_ABSOLUTE_TIMER,
35 // B_ONE_SHOT_RELATIVE_TIMER or B_PERIODIC_TIMER.
36 
37 timer_id	create_timer(timer_function func, void *cookie, bigtime_t interval, uint32 flags);
38 status_t	delete_timer(timer_id id);
39 
40 
41 status_t	initialize_timer(void);
42 status_t	terminate_timer(void);
43 
44 #endif
45