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