| /xnu-8019.80.24/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 | 189 if (thread != current_thread() && result == KERN_SUCCESS) { in thread_terminate_internal() 209 if (task == kernel_task && thread != current_thread()) { in thread_terminate() 349 if (thread != current_thread() && result == KERN_SUCCESS) { in thread_suspend() 546 if (thread != current_thread()) { in thread_get_state_internal() 640 if (thread != current_thread()) { in thread_set_state_internal() 732 from_thread = current_thread(); in thread_convert_thread_state() 734 to_thread = current_thread(); in thread_convert_thread_state() 783 if (thread != current_thread()) { in thread_state_initialize() 814 thread_t self = current_thread(); in thread_dup() 970 if (thread != current_thread()) { in thread_set_tsd_base() [all …]
|
| H A D | lock_rw.c | 821 assertf(owner != current_thread(), "Lock already held state=0x%x, owner=%p", in lck_rw_lock_exclusive_gen() 829 assert_canlock_rwlock(lock, current_thread(), LCK_RW_TYPE_EXCLUSIVE); in lck_rw_lock_exclusive_gen() 878 thread_set_pending_block_hint(current_thread(), kThreadWaitKernelRWLockWrite); in lck_rw_lock_exclusive_gen() 947 thread_set_pending_block_hint(current_thread(), kThreadWaitKernelRWLockWrite); in lck_rw_lock_exclusive_gen() 1022 thread_t thread = current_thread(); in lck_rw_lock_exclusive_check_contended() 1057 thread_t thread = current_thread(); in lck_rw_lock_exclusive_internal_inline() 1139 assertf(owner != current_thread(), "Lock already held state=0x%x, owner=%p", in lck_rw_lock_shared_gen() 1146 assert_canlock_rwlock(lck, current_thread(), LCK_RW_TYPE_SHARED); in lck_rw_lock_shared_gen() 1195 thread_set_pending_block_hint(current_thread(), kThreadWaitKernelRWLockRead); in lck_rw_lock_shared_gen() 1238 thread_t thread = current_thread(); in lck_rw_lock_shared_internal_inline() [all …]
|
| H A D | locks.c | 825 thread_t thread = current_thread(); in hw_wait_while_equals() 892 thread_t thread = current_thread(); 905 thread_t thread = current_thread(); 922 thread_t thread = current_thread(); 939 thread_t thread = current_thread(); 974 thread_t thread = current_thread(); 987 thread_t thread = current_thread(); 1063 thread_t thread = current_thread(); in hw_lock_bit_to_contended() 1157 __lck_require_preemption_disabled(lock, current_thread()); 1233 __lck_require_preemption_disabled(lock, current_thread()); in hw_unlock_bit_nopreempt() [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() 523 thread_t cthread = current_thread(); in hw_lck_ticket_lock_to() 544 thread_t cthread = current_thread(); in lck_ticket_lock() 565 lock_disable_preemption_for_thread(current_thread()); in hw_lck_ticket_lock_try() 585 thread_t cthread = current_thread(); in lck_ticket_lock_try() 637 thread_t cthread = current_thread(); in hw_lck_ticket_lock_allow_invalid() 688 assertf(tlock->lck_owner == (uintptr_t)current_thread(), in lck_ticket_unlock() 702 self = current_thread(); in lck_ticket_assert_owned()
|
| H A D | thread.c | 413 thread_t thread = current_thread(); in thread_corpse_continue() 443 thread_t thread = current_thread(); in thread_terminate_self() 584 task_deliver_crash_notification(task, current_thread(), etype, subcode); in thread_terminate_self() 1058 assert(th_remove != current_thread()); in thread_terminate_crashed_threads() 1188 if (__improbable(current_thread() == &init_thread)) { in thread_create_internal() 2146 thread = current_thread(); in thread_get_runtime_self() 2211 if (host_priv == NULL || thread != current_thread()) { in thread_wire_internal() 2253 return current_thread()->options & TH_OPT_VMPRIV ? TRUE : FALSE; in is_vm_privileged() 2261 if (current_thread()->options & TH_OPT_VMPRIV) { in set_vm_privilege() 2268 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-8019.80.24/osfmk/tests/ |
| H A D | kernel_tests.c | 897 clear_wait(current_thread(), THREAD_AWAKENED); in wait_threads() 920 thread_t thread = current_thread(); in thread_lock_unlock_kernel_primitive() 1090 if (info->threads[i] != current_thread()) { in wait_for_waiters() 1129 if (os_atomic_load(&info->threads[i], acquire) == current_thread()) { in exclude_current_waiter() 1460 uint my_pri = current_thread()->sched_pri; in thread_inheritor_like_mutex() 1462 T_LOG("Started thread pri %d %p", my_pri, current_thread()); in thread_inheritor_like_mutex() 1473 info->thread_inheritor = current_thread(); in thread_inheritor_like_mutex() 1485 …T_ASSERT(info->thread_inheritor == current_thread(), "thread_inheritor is %p", info->thread_inheri… in thread_inheritor_like_mutex() 1493 …T_ASSERT(info->thread_inheritor != current_thread(), "thread_inheritor is %p", info->thread_inheri… in thread_inheritor_like_mutex() 1499 assert(current_thread()->kern_promotion_schedpri == 0); in thread_inheritor_like_mutex() [all …]
|
| /xnu-8019.80.24/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 | 424 thread_t thread = current_thread(); in _disable_preemption() 472 thread_t t = current_thread(); in _disable_preemption_without_measurements() 560 thread_t thread = current_thread(); in _enable_preemption() 585 return current_thread()->machine.preemption_count; in get_preemption_level() 734 …if ((LCK_MTX_STATE_TO_THREAD(lock->lck_spin_data) != current_thread()) && LOCK_CORRECTNESS_PANIC()… in lck_spin_unlock() 751 …if ((LCK_MTX_STATE_TO_THREAD(lock->lck_spin_data) != current_thread()) && LOCK_CORRECTNESS_PANIC()… in lck_spin_unlock_nopreempt() 1059 thread = current_thread(); in lck_mtx_lock() 1506 lck_mtx_lock_contended(lock, current_thread(), TRUE); in lck_mtx_lock_spin_internal() 1550 thread_t thread = current_thread(); in lck_mtx_try_lock() 1650 thread_t thread = current_thread(); in lck_mtx_unlock() [all …]
|
| H A D | status.c | 299 if (thread != current_thread() || getCpuDatap()->cpu_int_state == NULL) { in machine_thread_get_kern_state() 486 if (thread == current_thread()) { in machine_thread_set_state() 621 if (thread != current_thread() || getCpuDatap()->cpu_int_state == NULL) { in find_kern_regs() 871 kret = machine_thread_get_state(current_thread(), in act_thread_csave() 881 kret = machine_thread_get_state(current_thread(), in act_thread_csave() 909 kret = machine_thread_set_state(current_thread(), in act_thread_catt() 918 kret = machine_thread_set_state(current_thread(), in act_thread_catt() 945 thread_t curth = current_thread(); in thread_set_wq_state32()
|
| /xnu-8019.80.24/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 | 418 thread = current_thread(); in lck_spin_assert() 486 l, lowner, current_thread(), lsti->owner_cpu, in usimple_lock_acquire_timeout_panic() 810 l->debug.lock_thread == (void *) current_thread()) { in usld_lock_pre() 853 l->debug.lock_thread = (void *)current_thread(); in usld_lock_post() 888 if (l->debug.lock_thread != (void *) current_thread()) { in usld_unlock() 958 l->debug.lock_thread = (void *) current_thread(); in usld_lock_try_post() 1221 thread = current_thread(); in lck_mtx_unlock_slow() 1330 assert(current_thread()->turnstile != NULL); in lck_mtx_unlock_wakeup_tail() 1375 assert(current_thread()->turnstile != NULL); in lck_mtx_lock_acquire_inline() 1563 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-8019.80.24/bsd/dev/dtrace/ |
| H A D | profile_prvd.c | 159 x86_saved_state_t *kern_regs = find_kern_regs(current_thread()); in profile_fire() 165 pal_register_cache_state(current_thread(), VALID); in profile_fire() 167 x86_saved_state_t *tagged_regs = (x86_saved_state_t *)find_user_regs(current_thread()); in profile_fire() 185 arm_saved_state_t *arm_kern_regs = (arm_saved_state_t *) find_kern_regs(current_thread()); in profile_fire() 195 arm_saved_state_t *arm_user_regs = (arm_saved_state_t *)find_user_regs(current_thread()); in profile_fire() 207 arm_saved_state_t *arm_kern_regs = (arm_saved_state_t *) find_kern_regs(current_thread()); in profile_fire() 217 arm_saved_state_t *arm_user_regs = (arm_saved_state_t *)find_user_regs(current_thread()); in profile_fire() 238 x86_saved_state_t *kern_regs = find_kern_regs(current_thread()); in profile_tick() 244 pal_register_cache_state(current_thread(), VALID); in profile_tick() 246 x86_saved_state_t *tagged_regs = (x86_saved_state_t *)find_user_regs(current_thread()); in profile_tick() [all …]
|
| /xnu-8019.80.24/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() 174 kret = kern_work_interval_notify(current_thread(), &kwi_args); in work_interval_ctl() 189 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-8019.80.24/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() 284 proc_pid(current_proc()), thread_tid(current_thread())); in mach_syscall() 296 prior __assert_only = thread_get_kernel_state(current_thread())->allocation_name; in mach_syscall()
|
| H A D | status.c | 335 if (current_thread()->machine.disable_user_jop || !thread_is_64bit_addr(current_thread()) || in machine_thread_state_convert_to_user() 426 if (current_thread()->machine.disable_user_jop || !thread_is_64bit_addr(current_thread())) { in machine_thread_state_convert_from_user() 503 if (current_thread()->machine.disable_user_jop || !thread_is_64bit_addr(current_thread())) { in machine_thread_siguctx_pointer_convert_to_user() 537 if (current_thread()->machine.disable_user_jop || !thread_is_64bit_addr(current_thread())) { in machine_thread_function_pointers_convert_from_user() 873 if (thread != current_thread() || getCpuDatap()->cpu_int_state == NULL) { in machine_thread_get_kern_state() 1066 if (thread == current_thread()) { in machine_thread_set_state() 1143 if (thread == current_thread()) { in machine_thread_set_state() 1219 if (thread == current_thread()) { in machine_thread_set_state() 1439 if (thread != current_thread() || getCpuDatap()->cpu_int_state == NULL) { in find_kern_regs() 1793 thread_t thread = current_thread(); in act_thread_csave() [all …]
|
| /xnu-8019.80.24/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-8019.80.24/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-8019.80.24/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-8019.80.24/bsd/vm/ |
| H A D | vm_unix.c | 2030 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_check_np() 2070 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_check_np() 2085 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_check_np() 2109 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_copyin() 2163 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_map_and_slide_setup() 2201 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_map_and_slide_setup() 2215 (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() 2251 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_map_and_slide_setup() 2261 (void *)VM_KERNEL_ADDRPERM(current_thread()), in shared_region_map_and_slide_setup() [all …]
|