]> git.saurik.com Git - apple/xnu.git/blame - osfmk/kern/timer_call.h
xnu-344.49.tar.gz
[apple/xnu.git] / osfmk / kern / timer_call.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 1993-1995, 1999-2000 Apple Computer, Inc.
3 * All rights reserved.
4 *
5 * @APPLE_LICENSE_HEADER_START@
6 *
43866e37 7 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
1c79356b 8 *
43866e37
A
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
1c79356b
A
18 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
19 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
43866e37
A
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.
1c79356b
A
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
1c79356b
A
38#include <mach/mach_types.h>
39
40#ifdef MACH_KERNEL_PRIVATE
41
42typedef struct call_entry *timer_call_t;
43typedef void *timer_call_param_t;
44typedef void (*timer_call_func_t)(
45 timer_call_param_t param0,
46 timer_call_param_t param1);
47
48boolean_t
49timer_call_enter(
50 timer_call_t call,
0b4e3aa0 51 uint64_t deadline);
1c79356b
A
52
53boolean_t
54timer_call_enter1(
55 timer_call_t call,
56 timer_call_param_t param1,
0b4e3aa0 57 uint64_t deadline);
1c79356b
A
58
59boolean_t
60timer_call_cancel(
61 timer_call_t call);
62
63boolean_t
64timer_call_is_delayed(
65 timer_call_t call,
0b4e3aa0 66 uint64_t *deadline);
1c79356b
A
67
68#include <kern/call_entry.h>
69
70typedef struct call_entry timer_call_data_t;
71
72void
73timer_call_initialize(void);
74
75void
76timer_call_setup(
77 timer_call_t call,
78 timer_call_func_t func,
79 timer_call_param_t param0);
80
9bccf70c
A
81void
82timer_call_shutdown(
83 processor_t processor);
84
1c79356b
A
85#endif /* MACH_KERNEL_PRIVATE */
86
87#endif /* _KERN_TIMER_CALL_H_ */