]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/syscall_subr.c
xnu-517.12.7.tar.gz
[apple/xnu.git] / osfmk / kern / syscall_subr.c
index b5ff64c69babbdb0bf60e2dcb8c73e078a4bd150..26fc9b21401aa79e3ad839f9169910e177bd1df8 100644 (file)
@@ -120,7 +120,7 @@ swtch(void)
 
        counter(c_swtch_block++);
 
-       thread_block(swtch_continue);
+       thread_block_reason(swtch_continue, AST_YIELD);
 
        mp_disable_preemption();
        myprocessor = current_processor();
@@ -170,7 +170,7 @@ swtch_pri(
 
        _mk_sp_thread_depress_abstime(std_quantum);
 
-       thread_block(swtch_pri_continue);
+       thread_block_reason(swtch_pri_continue, AST_YIELD);
 
        _mk_sp_thread_depress_abort(current_thread(), FALSE);
 
@@ -194,7 +194,6 @@ thread_switch(
        int                                             option,
        mach_msg_timeout_t              option_time)
 {
-    register thread_t          self = current_thread();
     register thread_act_t      hint_act = THR_ACT_NULL;
 
     /*
@@ -214,7 +213,7 @@ thread_switch(
     if (thread_name != MACH_PORT_NULL) {
                ipc_port_t                      port;
 
-               if (ipc_port_translate_send(self->top_act->task->itk_space,
+               if (ipc_port_translate_send(current_task()->itk_space,
                                                                        thread_name, &port) == KERN_SUCCESS) {
                        ip_reference(port);
                        ip_unlock(port);