| /xnu-8020.140.41/osfmk/kern/ |
| H A D | kpc_thread.c | 109 if (!current_thread()->kpc_buf) { in kpc_set_thread_counting() 110 current_thread()->kperf_ast |= T_KPC_ALLOC; in kpc_set_thread_counting() 111 act_set_kperf(current_thread()); in kpc_set_thread_counting() 143 if (!current_thread()->kpc_buf) { in kpc_update_thread_counters() 144 current_thread()->kperf_ast |= T_KPC_ALLOC; in kpc_update_thread_counters() 145 act_set_kperf(current_thread()); in kpc_update_thread_counters() 158 thread_t thread = current_thread(); in kpc_get_curthread_counters() 174 kpc_update_thread_counters( current_thread()); in kpc_get_curthread_counters()
|
| H A D | syscall_subr.c | 110 result = SCHED(thread_should_yield)(myprocessor, current_thread()); in swtch_continue() 127 if (!SCHED(thread_should_yield)(myprocessor, current_thread())) { in swtch() 143 thread_depress_abort(current_thread()); in swtch_pri_continue() 147 result = SCHED(thread_should_yield)(myprocessor, current_thread()); in swtch_pri_continue() 164 if (!SCHED(thread_should_yield)(myprocessor, current_thread())) { in swtch_pri() 179 thread_t self = current_thread(); in thread_switch_continue() 202 thread_t self = current_thread(); in thread_switch() 306 bool should_yield = SCHED(thread_should_yield)(current_processor(), current_thread()); in thread_switch() 352 thread_t self = current_thread(); in thread_handoff_internal() 433 thread_t self = current_thread(); in thread_depress_abstime() [all …]
|
| H A D | thread_act.c | 194 if (thread != current_thread() && result == KERN_SUCCESS) { in thread_terminate_internal() 214 if (task == kernel_task && thread != current_thread()) { in thread_terminate() 354 if (thread != current_thread() && result == KERN_SUCCESS) { in thread_suspend() 552 if (thread != current_thread()) { in thread_get_state_internal() 649 if (thread != current_thread()) { in thread_set_state_internal() 741 from_thread = current_thread(); in thread_convert_thread_state() 743 to_thread = current_thread(); in thread_convert_thread_state() 792 if (thread != current_thread()) { in thread_state_initialize() 823 thread_t self = current_thread(); in thread_dup() 984 if (thread != current_thread()) { in thread_set_tsd_base() [all …]
|
| H A D | lock_ticket.c | 141 lock_disable_preemption_for_thread(current_thread()); in hw_lck_ticket_init_locked() 502 thread_t cthread = current_thread(); in hw_lck_ticket_lock() 524 thread_t cthread = current_thread(); in hw_lck_ticket_lock_to() 546 thread_t cthread = current_thread(); in __lck_ticket_lock() 582 lock_disable_preemption_for_thread(current_thread()); in hw_lck_ticket_lock_try() 602 thread_t cthread = current_thread(); in __lck_ticket_lock_try() 671 lock_disable_preemption_for_thread(current_thread()); in hw_lck_ticket_reserve() 688 lock_disable_preemption_for_thread(current_thread()); in hw_lck_ticket_reserve_allow_invalid() 713 return hw_lck_ticket_contended(lck, current_thread(), arg, timeout, in hw_lck_ticket_wait() 733 return hw_lck_ticket_contended(lck, current_thread(), arg, timeout, in hw_lck_ticket_lock_allow_invalid() [all …]
|
| H A D | lock_rw.c | 819 assertf(owner != current_thread(), "Lock already held state=0x%x, owner=%p", in lck_rw_lock_exclusive_gen() 827 assert_canlock_rwlock(lock, current_thread(), LCK_RW_TYPE_EXCLUSIVE); in lck_rw_lock_exclusive_gen() 876 thread_set_pending_block_hint(current_thread(), kThreadWaitKernelRWLockWrite); in lck_rw_lock_exclusive_gen() 945 thread_set_pending_block_hint(current_thread(), kThreadWaitKernelRWLockWrite); in lck_rw_lock_exclusive_gen() 1020 thread_t thread = current_thread(); in lck_rw_lock_exclusive_check_contended() 1055 thread_t thread = current_thread(); in lck_rw_lock_exclusive_internal_inline() 1137 assertf(owner != current_thread(), "Lock already held state=0x%x, owner=%p", in lck_rw_lock_shared_gen() 1144 assert_canlock_rwlock(lck, current_thread(), LCK_RW_TYPE_SHARED); in lck_rw_lock_shared_gen() 1193 thread_set_pending_block_hint(current_thread(), kThreadWaitKernelRWLockRead); in lck_rw_lock_shared_gen() 1236 thread_t thread = current_thread(); in lck_rw_lock_shared_internal_inline() [all …]
|
| H A D | locks.c | 482 thread_t thread = current_thread(); in hw_wait_while_equals32() 545 thread_t thread = current_thread(); in hw_wait_while_equals64() 623 thread_t thread = current_thread(); 636 thread_t thread = current_thread(); 653 thread_t thread = current_thread(); 670 thread_t thread = current_thread(); 705 thread_t thread = current_thread(); 718 thread_t thread = current_thread(); 777 thread_t thread = current_thread(); in hw_lock_bit_to_contended() 903 __lck_require_preemption_disabled(lock, current_thread()); [all …]
|
| H A D | thread.c | 411 thread_t thread = current_thread(); in thread_corpse_continue() 441 thread_t thread = current_thread(); in thread_terminate_self() 596 task_deliver_crash_notification(task, current_thread(), etype, subcode); in thread_terminate_self() 1101 assert(th_remove != current_thread()); in thread_terminate_crashed_threads() 1230 if (__improbable(current_thread() == &init_thread)) { in thread_create_internal() 2160 thread = current_thread(); in thread_get_runtime_self() 2225 if (host_priv == NULL || thread != current_thread()) { in thread_wire_internal() 2266 return current_thread() == vm_pageout_state.vm_pageout_external_iothread; in is_external_pageout_thread() 2272 return current_thread()->options & TH_OPT_VMPRIV ? TRUE : FALSE; in is_vm_privileged() 2280 if (current_thread()->options & TH_OPT_VMPRIV) { in set_vm_privilege() [all …]
|
| H A D | hv_support_kext.c | 103 current_thread()->hv_thread_target = target; in hv_set_thread_target() 117 return current_thread()->hv_thread_target; in hv_get_thread_target() 129 is_volatile = (current_thread()->machine.ids != NULL); in hv_get_volatile_state()
|
| /xnu-8020.140.41/osfmk/tests/ |
| H A D | kernel_tests.c | 900 clear_wait(current_thread(), THREAD_AWAKENED); in wait_threads() 923 thread_t thread = current_thread(); in thread_lock_unlock_kernel_primitive() 1093 if (info->threads[i] != current_thread()) { in wait_for_waiters() 1132 if (os_atomic_load(&info->threads[i], acquire) == current_thread()) { in exclude_current_waiter() 1463 uint my_pri = current_thread()->sched_pri; in thread_inheritor_like_mutex() 1465 T_LOG("Started thread pri %d %p", my_pri, current_thread()); in thread_inheritor_like_mutex() 1476 info->thread_inheritor = current_thread(); in thread_inheritor_like_mutex() 1488 …T_ASSERT(info->thread_inheritor == current_thread(), "thread_inheritor is %p", info->thread_inheri… in thread_inheritor_like_mutex() 1496 …T_ASSERT(info->thread_inheritor != current_thread(), "thread_inheritor is %p", info->thread_inheri… in thread_inheritor_like_mutex() 1502 assert(current_thread()->kern_promotion_schedpri == 0); in thread_inheritor_like_mutex() [all …]
|
| /xnu-8020.140.41/osfmk/arm/ |
| H A D | machdep_call.c | 73 return machine_thread_set_tsd_base(current_thread(), self); in thread_set_cthread_self() 84 assert( self == current_thread()->machine.cthread_self); in thread_get_cthread_self() 85 return (kern_return_t) current_thread()->machine.cthread_self; in thread_get_cthread_self() 87 assert( self == current_thread()->machine.cthread_self); in thread_get_cthread_self()
|
| H A D | locks_arm.c | 420 thread_t thread = current_thread(); in _disable_preemption() 468 thread_t t = current_thread(); in _disable_preemption_without_measurements() 545 thread_t thread = current_thread(); in _enable_preemption() 576 return current_thread()->machine.preemption_count; in get_preemption_level() 724 …if ((LCK_MTX_STATE_TO_THREAD(lock->lck_spin_data) != current_thread()) && LOCK_CORRECTNESS_PANIC()… in lck_spin_unlock() 741 …if ((LCK_MTX_STATE_TO_THREAD(lock->lck_spin_data) != current_thread()) && LOCK_CORRECTNESS_PANIC()… in lck_spin_unlock_nopreempt() 996 thread = current_thread(); in lck_mtx_lock() 1484 lck_mtx_lock_contended(lock, current_thread(), TRUE); in lck_mtx_lock_spin_internal() 1528 thread_t thread = current_thread(); in lck_mtx_try_lock() 1634 thread_t thread = current_thread(); in lck_mtx_unlock() [all …]
|
| H A D | status.c | 303 if (thread != current_thread() || getCpuDatap()->cpu_int_state == NULL) { in machine_thread_get_kern_state() 490 if (thread == current_thread()) { in machine_thread_set_state() 625 if (thread != current_thread() || getCpuDatap()->cpu_int_state == NULL) { in find_kern_regs() 875 kret = machine_thread_get_state(current_thread(), in act_thread_csave() 885 kret = machine_thread_get_state(current_thread(), in act_thread_csave() 913 kret = machine_thread_set_state(current_thread(), in act_thread_catt() 922 kret = machine_thread_set_state(current_thread(), in act_thread_catt() 949 thread_t curth = current_thread(); in thread_set_wq_state32()
|
| H A D | pcb.c | 227 return current_thread()->machine.PcbData.pc; in get_useraddr() 346 …rintf("thread = %x continuation = %x, stack = %x\n", current_thread(), continuation, current_threa… in call_continuation() 440 if (thread == current_thread()) { in machine_thread_set_tsd_base()
|
| /xnu-8020.140.41/osfmk/i386/ |
| H A D | locks_i386_opt.c | 146 thread_t thread = current_thread(); in lck_mtx_lock() 200 thread_t thread = current_thread(); in lck_mtx_try_lock() 267 thread_t thread = current_thread(); in lck_mtx_lock_spin_always() 354 thread_t thread = current_thread(); in lck_mtx_try_lock_spin_always() 449 if (__improbable(owner != current_thread())) { in lck_mtx_unlock() 461 thread_t thread = current_thread(); in lck_mtx_unlock()
|
| H A D | bsd_i386_native.c | 160 machine_thread_set_tsd_base(current_thread(), self); in thread_fast_set_cthread_self() 176 machine_thread_set_tsd_base(current_thread(), self); in thread_fast_set_cthread_self64() 226 pcb = THREAD_TO_PCB(current_thread()); in thread_set_user_ldt()
|
| H A D | locks_i386.c | 416 thread = current_thread(); in lck_spin_assert() 484 l, lowner, current_thread(), lsti->owner_cpu, in usimple_lock_acquire_timeout_panic() 808 l->debug.lock_thread == (void *) current_thread()) { in usld_lock_pre() 851 l->debug.lock_thread = (void *)current_thread(); in usld_lock_post() 886 if (l->debug.lock_thread != (void *) current_thread()) { in usld_unlock() 956 l->debug.lock_thread = (void *) current_thread(); in usld_lock_try_post() 1178 thread = current_thread(); in lck_mtx_unlock_slow() 1287 assert(current_thread()->turnstile != NULL); in lck_mtx_unlock_wakeup_tail() 1332 assert(current_thread()->turnstile != NULL); in lck_mtx_lock_acquire_inline() 1520 thread = current_thread(); in lck_mtx_lock_contended() [all …]
|
| H A D | fpu.c | 548 (thread_is_64bit_addr(current_thread()) ? \ in fpu_load_registers() 821 if ((fresh_state == FALSE) && (old_valid == FALSE) && (thr_act != current_thread())) { in fpu_set_fxstate() 963 if (thr_act == current_thread()) { in fpu_set_fxstate() 1035 if (thr_act == current_thread()) { in fpu_get_fxstate() 1148 if (current_thread() == parent) { in fpu_dup_fxstate() 1150 assert(current_thread() == parent); in fpu_dup_fxstate() 1242 thr_act = current_thread(); in fpnoextflt() 1299 thread_t thr_act = current_thread(); in fpextovrflt() 1349 thread_t thr_act = current_thread(); in fpexterrflt() 1434 thread_t thr_act = current_thread(); in fpSSEexterrflt() [all …]
|
| /xnu-8020.140.41/bsd/dev/dtrace/ |
| H A D | profile_prvd.c | 156 x86_saved_state_t *kern_regs = find_kern_regs(current_thread()); in profile_fire() 162 pal_register_cache_state(current_thread(), VALID); in profile_fire() 164 x86_saved_state_t *tagged_regs = (x86_saved_state_t *)find_user_regs(current_thread()); in profile_fire() 182 arm_saved_state_t *arm_kern_regs = (arm_saved_state_t *) find_kern_regs(current_thread()); in profile_fire() 192 arm_saved_state_t *arm_user_regs = (arm_saved_state_t *)find_user_regs(current_thread()); in profile_fire() 204 arm_saved_state_t *arm_kern_regs = (arm_saved_state_t *) find_kern_regs(current_thread()); in profile_fire() 214 arm_saved_state_t *arm_user_regs = (arm_saved_state_t *)find_user_regs(current_thread()); in profile_fire() 235 x86_saved_state_t *kern_regs = find_kern_regs(current_thread()); in profile_tick() 241 pal_register_cache_state(current_thread(), VALID); in profile_tick() 243 x86_saved_state_t *tagged_regs = (x86_saved_state_t *)find_user_regs(current_thread()); in profile_tick() [all …]
|
| /xnu-8020.140.41/bsd/kern/ |
| H A D | sys_work_interval.c | 79 kret = kern_work_interval_create(current_thread(), &create_args); in work_interval_ctl() 103 kern_work_interval_destroy(current_thread(), create_args.wica_id); in work_interval_ctl() 140 kret = kern_work_interval_destroy(current_thread(), uap->work_interval_id); in work_interval_ctl() 175 kret = kern_work_interval_notify(current_thread(), &kwi_args); in work_interval_ctl() 190 kret = kern_work_interval_join(current_thread(), in work_interval_ctl()
|
| H A D | tty_tty.c | 99 context.vc_thread = current_thread(); in cttyopen() 170 context.vc_thread = current_thread(); in cttyread() 190 context.vc_thread = current_thread(); in cttywrite() 225 context.vc_thread = current_thread(); in cttyioctl() 241 context.vc_thread = current_thread(); in cttyselect()
|
| /xnu-8020.140.41/osfmk/arm64/ |
| H A D | bsd_arm64.c | 151 if (thread == current_thread()) { in thread_setsinglestep() 197 struct uthread *ut = get_bsdthread_info(current_thread()); in mach_syscall() 210 proc_pid(current_proc()), thread_tid(current_thread())); in mach_syscall() 287 proc_pid(current_proc()), thread_tid(current_thread())); in mach_syscall() 299 prior __assert_only = thread_get_kernel_state(current_thread())->allocation_name; in mach_syscall()
|
| /xnu-8020.140.41/bsd/dev/arm64/ |
| H A D | dtrace_isa.c | 232 thread_t thread = current_thread(); in dtrace_getupcstack() 299 thread_t thread = current_thread(); in dtrace_getustackdepth() 341 thread_t thread = current_thread(); in dtrace_getufpstack() 484 stacktop = (struct frame *) (dtrace_get_kernel_stack(current_thread()) + kernel_stack_size); in dtrace_getpcstack() 504 arm_saved_state_t *arm_kern_regs = (arm_saved_state_t *) find_kern_regs(current_thread()); in dtrace_getpcstack() 517 vm_offset_t kstack_base = dtrace_get_kernel_stack(current_thread()); in dtrace_getpcstack() 551 vm_offset_t kstack_base = dtrace_get_kernel_stack(current_thread()); in dtrace_getpcstack()
|
| /xnu-8020.140.41/bsd/dev/arm/ |
| H A D | dtrace_isa.c | 216 thread_t thread = current_thread(); in dtrace_getupcstack() 279 thread_t thread = current_thread(); in dtrace_getustackdepth() 321 thread_t thread = current_thread(); in dtrace_getufpstack() 446 stacktop = (struct frame *) (dtrace_get_kernel_stack(current_thread()) + kernel_stack_size); in dtrace_getpcstack() 466 arm_saved_state_t *arm_kern_regs = (arm_saved_state_t *) find_kern_regs(current_thread()); in dtrace_getpcstack() 470 vm_offset_t kstack_base = dtrace_get_kernel_stack(current_thread()); in dtrace_getpcstack()
|
| /xnu-8020.140.41/osfmk/ipc/ |
| H A D | mach_msg.c | 168 thread_t self = current_thread(); in mach_msg_receive_results() 294 thread_t self = current_thread(); in mach_msg_receive_continue() 382 thread_t self = current_thread(); in mach_msg_overwrite_trap() 457 if (current_thread()->ith_special_reply_port != special_reply_port) { in mach_msg_rcv_link_special_reply_port() 497 thread_t self = current_thread(); in mach_msg_receive_results_complete() 580 thread_t self = current_thread(); in msg_receive_error()
|
| /xnu-8020.140.41/bsd/vm/ |
| H A D | vm_unix.c | 2034 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_check_np() 2054 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_check_np() 2068 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_check_np() 2085 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_check_np() 2101 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_check_np() 2125 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_copyin() 2179 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_map_and_slide_setup() 2217 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_map_and_slide_setup() 2231 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_map_and_slide_setup() 2247 (void *)VM_KERNEL_ADDRPERM(current_thread()))); in shared_region_map_and_slide_setup() [all …]
|