/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
*
- * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. The rights granted to you under the
- * License may not be used to create, or enable the creation or
- * redistribution of, unlawful or unlicensed copies of an Apple operating
- * system, or to circumvent, violate, or enable the circumvention or
- * violation of, any terms of an Apple operating system software license
- * agreement.
- *
- * Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- *
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ *
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
* limitations under the License.
- *
- * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
+ *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
/*
* @OSF_FREE_COPYRIGHT@
#include <mach/std_types.defs>
#include <mach/mach_types.defs>
+#if !KERNEL && !LIBSYSCALL_INTERFACE
+#define PREFIX(NAME) _kernelrpc_ ## NAME
+#else
+#define PREFIX(NAME) NAME
+#endif
+
/*
* Destroy the target thread.
*
* If the thread is currently executing, the state change
* may be ill-defined.
*/
-routine act_set_state(
+routine
+#ifdef KERNEL_SERVER
+act_set_state_from_user(
+#else
+act_set_state(
+#endif
target_act : thread_act_t;
flavor : int;
new_state : thread_state_t);
* If the thread is currently executing, the state change
* may be ill-defined.
*/
-routine thread_set_state(
+routine
+#ifdef KERNEL_SERVER
+thread_set_state_from_user(
+#else
+thread_set_state(
+#endif
target_act : thread_act_t;
flavor : thread_state_flavor_t;
new_state : thread_state_t);
/*
* OBSOLETE interface.
*/
-routine thread_policy(
+routine PREFIX(thread_policy)(
thr_act : thread_act_t;
policy : policy_t;
base : policy_base_t;
* (Approved Mac OS X microkernel interface)
*/
-routine thread_policy_set(
+routine PREFIX(thread_policy_set)(
thread : thread_act_t;
flavor : thread_policy_flavor_t;
policy_info : thread_policy_t);
inout get_default : boolean_t);
/*
- * Thread profiling
- * This call is only valid for MACH_PROF compiled kernels.
- * Otherwise, KERN_FAILURE is returned.
+ * Removed from the kernel.
*/
+#if KERNEL_SERVER
+skip;
+#else
routine thread_sample(
thread : thread_act_t;
reply : mach_port_make_send_t);
+#endif
/*
* ETAP has been removed from the kernel.
/*
* OBSOLETE interface.
*/
-routine thread_set_policy(
- thr_act : thread_act_t;
- pset : processor_set_t;
- policy : policy_t;
- base : policy_base_t;
- limit : policy_limit_t);
+routine PREFIX(thread_set_policy)(
+ thr_act : thread_act_t;
+ pset : processor_set_t;
+ policy : policy_t;
+ base : policy_base_t;
+ limit : policy_limit_t);
+
+routine thread_get_mach_voucher(
+ thr_act : thread_act_t;
+ which : mach_voucher_selector_t;
+ out voucher : ipc_voucher_t);
+
+routine thread_set_mach_voucher(
+ thr_act : thread_act_t;
+ voucher : ipc_voucher_t);
+
+routine thread_swap_mach_voucher(
+ thr_act : thread_act_t;
+ new_voucher : ipc_voucher_t;
+ inout old_voucher : ipc_voucher_t);
+
+/* vim: set ft=c : */