]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 1993-1995, 1999-2000 Apple Computer, Inc. | |
3 | * All rights reserved. | |
4 | * | |
8ad349bb | 5 | * @APPLE_LICENSE_OSREFERENCE_HEADER_START@ |
1c79356b | 6 | * |
8ad349bb A |
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 | |
11 | * License may not be used to create, or enable the creation or | |
12 | * redistribution of, unlawful or unlicensed copies of an Apple operating | |
13 | * system, or to circumvent, violate, or enable the circumvention or | |
14 | * violation of, any terms of an Apple operating system software license | |
15 | * agreement. | |
16 | * | |
17 | * Please obtain a copy of the License at | |
18 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
19 | * file. | |
20 | * | |
21 | * The Original Code and all software distributed under the License are | |
22 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
23 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
24 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
25 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
26 | * Please see the License for the specific language governing rights and | |
27 | * limitations under the License. | |
28 | * | |
29 | * @APPLE_LICENSE_OSREFERENCE_HEADER_END@ | |
1c79356b A |
30 | */ |
31 | /* | |
32 | * Private declarations for thread-based callouts. | |
33 | * | |
34 | * HISTORY | |
35 | * | |
36 | * 10 July 1999 (debo) | |
37 | * Pulled into Mac OS X (microkernel). | |
38 | * | |
39 | * 3 July 1993 (debo) | |
40 | * Created. | |
41 | */ | |
42 | ||
43 | #ifndef _KERN_CALL_ENTRY_H_ | |
44 | #define _KERN_CALL_ENTRY_H_ | |
45 | ||
46 | #ifdef MACH_KERNEL_PRIVATE | |
47 | #include <kern/queue.h> | |
48 | ||
49 | typedef void *call_entry_param_t; | |
50 | typedef void (*call_entry_func_t)( | |
51 | call_entry_param_t param0, | |
52 | call_entry_param_t param1); | |
53 | ||
54 | typedef struct call_entry { | |
55 | queue_chain_t q_link; | |
56 | call_entry_func_t func; | |
57 | call_entry_param_t param0; | |
58 | call_entry_param_t param1; | |
0b4e3aa0 | 59 | uint64_t deadline; |
1c79356b A |
60 | enum { |
61 | IDLE, | |
62 | PENDING, | |
63 | DELAYED } state; | |
64 | } call_entry_data_t; | |
65 | ||
66 | #define call_entry_setup(entry, pfun, p0) \ | |
67 | MACRO_BEGIN \ | |
68 | (entry)->func = (call_entry_func_t)(pfun); \ | |
69 | (entry)->param0 = (call_entry_param_t)(p0); \ | |
70 | (entry)->state = IDLE; \ | |
71 | MACRO_END | |
72 | ||
73 | #endif /* MACH_KERNEL_PRIVATE */ | |
74 | ||
75 | #endif /* _KERN_CALL_ENTRY_H_ */ |