]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * The contents of this file constitute Original Code as defined in and | |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
11 | * | |
12 | * This Original Code and all software distributed under the License are | |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the | |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
19 | * | |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* | |
23 | * @OSF_COPYRIGHT@ | |
24 | * | |
25 | */ | |
26 | ||
27 | #ifndef _KERN_MK_SP_H_ | |
28 | #define _KERN_MK_SP_H_ | |
29 | ||
30 | /* | |
31 | * Include Files | |
32 | */ | |
33 | ||
34 | /* | |
35 | * Scheduling policy operation prototypes | |
36 | */ | |
37 | ||
38 | sf_return_t _mk_sp_init( | |
39 | sf_object_t policy, | |
40 | int policy_id); | |
41 | ||
42 | sf_return_t _mk_sp_enable_processor_set( | |
43 | sf_object_t policy, | |
44 | processor_set_t processor_set); | |
45 | ||
46 | sf_return_t _mk_sp_disable_processor_set( | |
47 | sf_object_t policy, | |
48 | processor_set_t processor_set); | |
49 | ||
50 | sf_return_t _mk_sp_enable_processor( | |
51 | sf_object_t policy, | |
52 | processor_t processor); | |
53 | ||
54 | sf_return_t _mk_sp_disable_processor( | |
55 | sf_object_t policy, | |
56 | processor_t processor); | |
57 | ||
58 | sf_return_t _mk_sp_thread_update_mpri( | |
59 | sf_object_t policy, | |
60 | thread_t thread); | |
61 | ||
62 | sf_return_t _mk_sp_thread_unblock( | |
63 | sf_object_t policy, | |
64 | thread_t thread); | |
65 | ||
66 | sf_return_t _mk_sp_thread_done( | |
67 | sf_object_t policy, | |
68 | thread_t old_thread); | |
69 | ||
70 | sf_return_t _mk_sp_thread_begin( | |
71 | sf_object_t policy, | |
72 | thread_t new_thread); | |
73 | ||
74 | sf_return_t _mk_sp_thread_dispatch( | |
75 | sf_object_t policy, | |
76 | thread_t old_thread); | |
77 | ||
78 | sf_return_t _mk_sp_thread_attach( | |
79 | sf_object_t policy, | |
80 | thread_t thread); | |
81 | ||
82 | sf_return_t _mk_sp_thread_detach( | |
83 | sf_object_t policy, | |
84 | thread_t thread); | |
85 | ||
86 | sf_return_t _mk_sp_thread_processor( | |
87 | sf_object_t policy, | |
88 | thread_t *thread, | |
89 | processor_t processor); | |
90 | ||
91 | sf_return_t _mk_sp_thread_processor_set( | |
92 | sf_object_t policy, | |
93 | thread_t thread, | |
94 | processor_set_t processor_set); | |
95 | ||
96 | sf_return_t _mk_sp_thread_setup( | |
97 | sf_object_t policy, | |
98 | thread_t thread); | |
99 | ||
100 | void _mk_sp_swtch_pri( | |
101 | sf_object_t policy, | |
102 | int pri); | |
103 | ||
104 | kern_return_t _mk_sp_thread_switch( | |
105 | sf_object_t policy, | |
106 | thread_act_t hint_act, | |
107 | int option, | |
108 | mach_msg_timeout_t option_time); | |
109 | ||
110 | kern_return_t _mk_sp_thread_depress_abort( | |
111 | sf_object_t policy, | |
112 | thread_t thread); | |
113 | ||
114 | void _mk_sp_thread_depress_timeout( | |
115 | sf_object_t policy, | |
116 | thread_t thread); | |
117 | ||
118 | boolean_t _mk_sp_thread_runnable( | |
119 | sf_object_t policy, | |
120 | thread_t thread); | |
121 | ||
122 | #define MK_SP_ATTACHED ( 0x0001 ) | |
123 | #define MK_SP_RUNNABLE ( 0x0002 ) | |
124 | #define MK_SP_BLOCKED ( 0x0004 ) | |
125 | ||
126 | /* | |
127 | * Definitions of standard scheduling operations for this policy | |
128 | */ | |
129 | extern sp_ops_t mk_sp_ops; | |
130 | ||
131 | #endif /* _KERN_MK_SP_H_ */ |