]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/mach/thread_act.defs
xnu-6153.121.1.tar.gz
[apple/xnu.git] / osfmk / mach / thread_act.defs
index 47a21a9e6947238ab19a3bffc6a8987d91e1d15f..205fff541d69511aac32e627677e8f9192c2f903 100644 (file)
@@ -71,6 +71,12 @@ subsystem
 #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.
  *
@@ -90,7 +96,12 @@ 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(
+routine
+#ifdef KERNEL_SERVER
+act_get_state_to_user(
+#else
+act_get_state(
+#endif
                target_act      : thread_act_t;
                flavor          : int;
        out     old_state       : thread_state_t, CountInOut);
@@ -100,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);
@@ -114,7 +130,12 @@ 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(
+routine
+#ifdef KERNEL_SERVER
+thread_get_state_to_user(
+#else
+thread_get_state(
+#endif
                target_act      : thread_act_t;
                flavor          : thread_state_flavor_t;
        out     old_state       : thread_state_t, CountInOut);
@@ -124,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);
@@ -175,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);
 
 
@@ -201,7 +232,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);
 
@@ -219,7 +250,7 @@ routine             thread_set_exception_ports(
  * Lookup some of the old exception handlers for a thread
  */
 routine                thread_get_exception_ports(
-                       thread          : thread_act_t;
+                       thread          : thread_inspect_t;
                        exception_mask  : exception_mask_t;
                  out   masks           : exception_mask_array_t;
                  out   old_handlers    : exception_handler_array_t, SameCount;
@@ -245,7 +276,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;
@@ -256,13 +287,13 @@ 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);
@@ -309,15 +340,28 @@ routine thread_get_assignment(
                thread          : thread_act_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_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 : */