]> git.saurik.com Git - apple/xnu.git/blob - osfmk/kern/timer_call.h
xnu-1228.3.13.tar.gz
[apple/xnu.git] / osfmk / kern / timer_call.h
1 /*
2 * Copyright (c) 1993-1995, 1999-2000 Apple Computer, Inc.
3 * All rights reserved.
4 *
5 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 *
7 * This file contains Original Code and/or Modifications of Original Code
8 * as defined in and that are subject to the Apple Public Source License
9 * Version 2.0 (the 'License'). You may not use this file except in
10 * compliance with the License. The rights granted to you under the License
11 * may not be used to create, or enable the creation or redistribution of,
12 * unlawful or unlicensed copies of an Apple operating system, or to
13 * circumvent, violate, or enable the circumvention or violation of, any
14 * terms of an Apple operating system software license agreement.
15 *
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 *
19 * The Original Code and all software distributed under the License are
20 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
21 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
22 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
24 * Please see the License for the specific language governing rights and
25 * limitations under the License.
26 *
27 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
28 */
29 /*
30 * Declarations for timer interrupt callouts.
31 *
32 * HISTORY
33 *
34 * 20 December 2000 (debo)
35 * Created.
36 */
37
38 #ifndef _KERN_TIMER_CALL_H_
39 #define _KERN_TIMER_CALL_H_
40
41 #include <mach/mach_types.h>
42
43 #ifdef MACH_KERNEL_PRIVATE
44
45 typedef struct call_entry *timer_call_t;
46 typedef void *timer_call_param_t;
47 typedef void (*timer_call_func_t)(
48 timer_call_param_t param0,
49 timer_call_param_t param1);
50
51 boolean_t
52 timer_call_enter(
53 timer_call_t call,
54 uint64_t deadline);
55
56 boolean_t
57 timer_call_enter1(
58 timer_call_t call,
59 timer_call_param_t param1,
60 uint64_t deadline);
61
62 boolean_t
63 timer_call_cancel(
64 timer_call_t call);
65
66 boolean_t
67 timer_call_is_delayed(
68 timer_call_t call,
69 uint64_t *deadline);
70
71 #include <kern/call_entry.h>
72
73 typedef struct call_entry timer_call_data_t;
74
75 void
76 timer_call_initialize(void);
77
78 void
79 timer_call_setup(
80 timer_call_t call,
81 timer_call_func_t func,
82 timer_call_param_t param0);
83
84 void
85 timer_call_shutdown(
86 processor_t processor);
87
88 #endif /* MACH_KERNEL_PRIVATE */
89
90 #endif /* _KERN_TIMER_CALL_H_ */