]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 1993-1995, 1999-2000 Apple Computer, Inc. | |
3 | * All rights reserved. | |
4 | * | |
5 | * @APPLE_LICENSE_HEADER_START@ | |
6 | * | |
de355530 A |
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. | |
1c79356b | 12 | * |
de355530 A |
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 | |
1c79356b A |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
de355530 A |
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. | |
1c79356b A |
20 | * |
21 | * @APPLE_LICENSE_HEADER_END@ | |
22 | */ | |
23 | /* | |
24 | * Private declarations for thread-based callouts. | |
25 | * | |
26 | * HISTORY | |
27 | * | |
28 | * 10 July 1999 (debo) | |
29 | * Pulled into Mac OS X (microkernel). | |
30 | * | |
31 | * 3 July 1993 (debo) | |
32 | * Created. | |
33 | */ | |
34 | ||
35 | #ifndef _KERN_CALL_ENTRY_H_ | |
36 | #define _KERN_CALL_ENTRY_H_ | |
37 | ||
38 | #ifdef MACH_KERNEL_PRIVATE | |
39 | #include <kern/queue.h> | |
40 | ||
41 | typedef void *call_entry_param_t; | |
42 | typedef void (*call_entry_func_t)( | |
43 | call_entry_param_t param0, | |
44 | call_entry_param_t param1); | |
45 | ||
46 | typedef struct call_entry { | |
47 | queue_chain_t q_link; | |
48 | call_entry_func_t func; | |
49 | call_entry_param_t param0; | |
50 | call_entry_param_t param1; | |
0b4e3aa0 | 51 | uint64_t deadline; |
1c79356b A |
52 | enum { |
53 | IDLE, | |
54 | PENDING, | |
55 | DELAYED } state; | |
56 | } call_entry_data_t; | |
57 | ||
58 | #define call_entry_setup(entry, pfun, p0) \ | |
59 | MACRO_BEGIN \ | |
60 | (entry)->func = (call_entry_func_t)(pfun); \ | |
61 | (entry)->param0 = (call_entry_param_t)(p0); \ | |
62 | (entry)->state = IDLE; \ | |
63 | MACRO_END | |
64 | ||
65 | #endif /* MACH_KERNEL_PRIVATE */ | |
66 | ||
67 | #endif /* _KERN_CALL_ENTRY_H_ */ |