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