X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/1c79356b52d46aa6b508fb032f5ae709b1f2897b..2a1bd2d3eef5c7a7bb14f4bb9fdbca9a96ee4752:/osfmk/mach/thread_act.defs?ds=sidebyside diff --git a/osfmk/mach/thread_act.defs b/osfmk/mach/thread_act.defs index 2637408a4..e7f20e54c 100644 --- a/osfmk/mach/thread_act.defs +++ b/osfmk/mach/thread_act.defs @@ -1,23 +1,29 @@ /* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. * - * @APPLE_LICENSE_HEADER_START@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. + * 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. * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * 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 OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * 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_HEADER_END@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* * @OSF_FREE_COPYRIGHT@ @@ -59,12 +65,18 @@ subsystem #if KERNEL_SERVER KernelServer -#endif KERNEL_SERVER +#endif /* KERNEL_SERVER */ thread_act 3600; #include #include +#if !KERNEL && !LIBSYSCALL_INTERFACE +#define PREFIX(NAME) _kernelrpc_ ## NAME +#else +#define PREFIX(NAME) NAME +#endif + /* * Destroy the target thread. * @@ -84,8 +96,13 @@ routine thread_terminate( * may be stale. [Flavor THREAD_STATE_FLAVOR_LIST provides a * list of valid flavors for the target thread.] */ -routine act_get_state( - target_act : thread_act_t; +routine +#ifdef KERNEL_SERVER +act_get_state_to_user( +#else +act_get_state( +#endif + target_act : thread_read_t; flavor : int; out old_state : thread_state_t, CountInOut); @@ -94,7 +111,12 @@ routine act_get_state( * 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); @@ -108,8 +130,13 @@ routine act_set_state( * may be stale. [Flavor THREAD_STATE_FLAVOR_LIST provides a * list of valid flavors for the target thr_act.] */ -routine thread_get_state( - target_act : thread_act_t; +routine +#ifdef KERNEL_SERVER +thread_get_state_to_user( +#else +thread_get_state( +#endif + target_act : thread_read_t; flavor : thread_state_flavor_t; out old_state : thread_state_t, CountInOut); @@ -118,7 +145,12 @@ routine thread_get_state( * 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); @@ -169,7 +201,12 @@ routine thread_abort_safely( target_act : thread_act_t); -routine thread_depress_abort( +routine +#ifdef KERNEL_SERVER +thread_depress_abort_from_user( +#else +thread_depress_abort( +#endif thread : thread_act_t); @@ -177,11 +214,18 @@ routine thread_depress_abort( * Returns the current value of the selected special port * associated with the target thread. */ -routine thread_get_special_port( - thr_act : thread_act_t; +routine +#ifdef KERNEL_SERVER +thread_get_special_port_from_user( + port : mach_port_t; +#else +thread_get_special_port( + thr_act : thread_inspect_t; +#endif which_port : int; out special_port : mach_port_t); + /* * Set one of the special ports associated with the * target thread. @@ -195,7 +239,7 @@ routine thread_set_special_port( * Returns information about the target thread. */ routine thread_info( - target_act : thread_act_t; + target_act : thread_inspect_t; flavor : thread_flavor_t; out thread_info_out : thread_info_t, CountInOut); @@ -212,8 +256,14 @@ routine thread_set_exception_ports( /* * Lookup some of the old exception handlers for a thread */ -routine thread_get_exception_ports( +routine +#if KERNEL_SERVER +thread_get_exception_ports_from_user( + port : mach_port_t; +#else +thread_get_exception_ports( thread : thread_act_t; +#endif exception_mask : exception_mask_t; out masks : exception_mask_array_t; out old_handlers : exception_handler_array_t, SameCount; @@ -239,7 +289,7 @@ routine thread_swap_exception_ports( /* * OBSOLETE interface. */ -routine thread_policy( +routine PREFIX(thread_policy)( thr_act : thread_act_t; policy : policy_t; base : policy_base_t; @@ -250,36 +300,38 @@ routine thread_policy( * (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); routine thread_policy_get( - thread : thread_act_t; + thread : thread_inspect_t; flavor : thread_policy_flavor_t; out policy_info : thread_policy_t, CountInOut; 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 /* - * JMM - Keep etap and processor_set related things at the end - * because they are likely to be removed. - */ -/* - * Sets the ETAP trace status of the target thread. + * ETAP has been removed from the kernel. */ +#if KERNEL_SERVER +skip; +#else routine etap_trace_thread( target_act : thread_act_t; trace_status : boolean_t); +#endif /* * Assign thread to processor set. @@ -298,16 +350,41 @@ routine thread_assign_default( * Get current assignment for thread. */ routine thread_get_assignment( - thread : thread_act_t; + thread : thread_inspect_t; out assigned_set : processor_set_name_t); - /* * 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_read_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); + +routine thread_convert_thread_state( + thread : thread_act_t; + direction : int; + flavor : thread_state_flavor_t; + in_state : thread_state_t; + out out_state : thread_state_t, CountInOut); + +#ifdef XNU_KERNEL_PRIVATE +#endif + +/* vim: set ft=c : */