Home
last modified time | relevance | path

Searched refs:thread (Results 1 – 25 of 399) sorted by relevance

12345678910>>...16

/xnu-11215/osfmk/kern/
H A Dthread_act.c209 thread_lock(thread); in thread_start_in_assert_wait()
221 thread); in thread_start_in_assert_wait()
252 act_abort(thread); in thread_terminate_internal()
386 thread->thread_id, thread->user_stop_count, task->pidsuspended); in thread_hold()
402 assertf(thread->suspend_count > 0, "thread %p over-resumed", thread); in thread_release()
414 thread_wakeup_thread(&thread->suspend_count, thread); in thread_release()
425 if (thread == THREAD_NULL || get_threadtask(thread) == kernel_task) { in thread_suspend()
453 if (thread == THREAD_NULL || get_threadtask(thread) == kernel_task) { in thread_resume()
609 if (thread->active || thread->inspection) { in thread_info()
1227 thread_t thread, in thread_raise_exception() argument
[all …]
H A Dpriority.c708 thread->cpu_usage = thread->cpu_delta = 0; in update_priority()
728 thread->pri_shift = sched_clutch_thread_pri_shift(thread, thread->th_sched_bucket); in update_priority()
1042 thread->saved_mode = thread->sched_mode; in sched_thread_mode_demote()
1130 thread_tid(thread), thread->sched_pri, in sched_thread_promote_reason()
1135 thread_tid(thread), thread->sched_pri, in sched_thread_promote_reason()
1140 thread_tid(thread), thread->sched_pri, in sched_thread_promote_reason()
1145 thread_tid(thread), thread->sched_pri, in sched_thread_promote_reason()
1171 thread_tid(thread), thread->sched_pri, in sched_thread_unpromote_reason()
1176 thread_tid(thread), thread->sched_pri, in sched_thread_unpromote_reason()
1181 thread_tid(thread), thread->sched_pri, in sched_thread_unpromote_reason()
[all …]
H A Dthread_policy.c874 if (!thread->static_param || !thread->active) { in thread_set_workq_pri()
1194 if (!thread->active || thread->policy_reset) { in thread_policy_update_tasklocked()
1581 thread_tid(thread), theffective_0(thread), in thread_policy_create()
1582 theffective_1(thread), thread->base_pri, 0); in thread_policy_create()
1591 thread_tid(thread), theffective_0(thread), in thread_policy_create()
1600 thread_tid(thread), theffective_0(thread), in thread_policy_update_spinlocked()
1607 thread_tid(thread), theffective_0(thread), in thread_policy_update_spinlocked()
2029 thread_tid(thread), threquested_0(thread), in proc_set_thread_policy_spinlocked()
2038 thread_tid(thread), threquested_0(thread), in proc_set_thread_policy_spinlocked()
2976 thread_tid(thread), threquested_0(thread), threquested_1(thread), in task_set_main_thread_qos()
[all …]
H A Dthread.c343 memcpy(thread, &thread_template, sizeof(*thread)); in init_thread_from_template()
662 thread, thread->depress_timer_active); in thread_terminate_self()
693 thread, thread->wait_timer_active, in thread_terminate_self()
905 thread_t thread; in thread_exception_queue_invoke() local
1928 thread->reserved_stack = thread->kernel_stack; in kernel_thread_create()
2405 ret.thread = thread; in thread_priority_floor_start()
2420 …token->thread == thread, "thread_priority_floor_end called from a different thread from thread_pri… in thread_priority_floor_end()
3036 return thread != THREAD_NULL? thread->thread_id: 0; in thread_tid()
3454 if (thread != current_thread() && thread->started) { in thread_set_mach_voucher()
4116 assert(thread && thread->ctid == ctid); in ctid_get_thread()
[all …]
H A Dast.c193 ast_propagate(thread); in ast_taken_user()
224 bsd_ast(thread); in ast_taken_user()
238 arcade_ast(thread); in ast_taken_user()
244 thread_apc_ast(thread); in ast_taken_user()
249 guard_ast(thread); in ast_taken_user()
254 ledger_ast(thread); in ast_taken_user()
263 thread->kperf_ast = 0; in ast_taken_user()
310 sfi_ast(thread); in ast_taken_user()
331 thread_lock(thread); in ast_taken_user()
333 thread_unlock(thread); in ast_taken_user()
[all …]
H A Dsched_prim.c1079 ledger_credit_thread(thread, thread->t_ledger, in thread_unblock()
1082 ledger_credit_thread(thread, thread->t_ledger, in thread_unblock()
1088 ledger_credit_thread(thread, thread->t_ledger, in thread_unblock()
1093 ledger_credit_thread(thread, thread->t_ledger, in thread_unblock()
1116 (uintptr_t)thread_tid(thread), thread->sched_pri, thread->wait_result, in thread_unblock()
1268 thread->block_hint = thread->pending_block_hint; in thread_mark_wait_locked()
3218 thread->sfi_class = sfi_thread_classify(thread); in thread_invoke()
3685 ledger_credit_thread(thread, thread->t_ledger, in thread_dispatch()
3831 (uintptr_t)thread_tid(thread), thread->reason, thread->state, in thread_dispatch()
5918 thread->sfi_class = sfi_thread_classify(thread); in thread_setrun()
[all …]
H A Dthread.h384 struct thread { struct
1088 #define assert_thread_magic(thread) do { (void)(thread); } while (0) argument
1151 thread_t thread);
1172 #define thread_should_halt_fast(thread) (!(thread)->active) argument
1371 thread_t thread);
1374 thread_t thread);
1520 thread_t thread,
1718 thread_t thread,
1737 thread_t thread,
1790 thread_t thread; member
[all …]
H A Dsched_prim.h117 thread_t thread,
122 thread_t thread);
126 thread_t thread,
143 thread_t thread);
178 thread_t thread,
229 thread_t thread,
276 thread_t thread,
302 thread_t thread,
315 thread_t thread);
328 thread_t thread,
[all …]
H A Dsyscall_subr.c255 if (thread != THREAD_NULL) { in thread_switch()
272 if (thread != THREAD_NULL) { in thread_switch()
279 thread_tid(thread), thread->state, in thread_switch()
299 thread_deallocate(thread); in thread_switch()
357 if (thread != THREAD_NULL) { in thread_handoff_internal()
363 thread_tid(thread), thread->state, in thread_handoff_internal()
474 thread_t thread = (thread_t)p0; in thread_depress_expire() local
477 thread_lock(thread); in thread_depress_expire()
489 thread_unlock(thread); in thread_depress_expire()
502 thread_lock(thread); in thread_depress_abort()
[all …]
H A Dexclaves_inspection.c106 if (thread == NULL) { in prepare_scid_list_stackshot()
126 if (thread == NULL) { in prepare_scid_list_kperf()
141 thread_t thread; in clear_pending_threads_stackshot() local
146 assert(thread); in clear_pending_threads_stackshot()
158 thread_t thread; in clear_pending_threads_kperf() local
163 assert(thread); in clear_pending_threads_kperf()
174 thread_t thread; in clear_stackshot_queue() local
180 assert(thread); in clear_stackshot_queue()
190 thread_t thread; in clear_kperf_queue() local
196 assert(thread); in clear_kperf_queue()
[all …]
H A Dpolicy_internal.h132 extern boolean_t thread_has_qos_policy(thread_t thread);
177 extern void thread_freeze_base_pri(thread_t thread);
178 extern bool thread_unfreeze_base_pri(thread_t thread);
315 uintptr_t threquested_0(thread_t thread);
316 uintptr_t threquested_1(thread_t thread);
317 uintptr_t theffective_0(thread_t thread);
318 uintptr_t theffective_1(thread_t thread);
328 extern void thread_policy_create(thread_t thread);
334 extern void thead_remove_taskwatch(thread_t thread);
359 extern void thread_policy_reset(thread_t thread);
[all …]
H A Dwork_interval.c883 (thread->sched_mode != TH_MODE_REALTIME) && (thread->saved_mode != TH_MODE_REALTIME)) { in thread_set_work_interval()
903 thread_lock(thread); in thread_set_work_interval()
920 …bool thread_on_remote_core = ((thread != current_thread()) && (thread->state & TH_RUN) && (thread_… in thread_set_work_interval()
967 thread_unlock(thread); in thread_set_work_interval()
978 work_interval_set_policy(thread); in thread_set_work_interval()
1026 thread_rt_evaluate(thread); in thread_set_work_interval()
1039 assert(thread == current_thread()); in thread_set_work_interval_explicit_join()
1046 assert(thread == current_thread()); in work_interval_thread_terminate()
1056 assert(thread == current_thread()); in kern_work_interval_notify()
1099 assert(thread == current_thread()); in kern_work_interval_create()
[all …]
H A Daffinity.c158 thread_mtx_lock(thread); in thread_affinity_set()
159 if (!thread->active) { in thread_affinity_set()
161 thread_mtx_unlock(thread); in thread_affinity_set()
172 thread, tag, aset); in thread_affinity_set()
183 thread, tag, aset); in thread_affinity_set()
201 thread, tag, aset); in thread_affinity_set()
209 thread_mtx_unlock(thread); in thread_affinity_set()
460 thread_lock(thread); in affinity_set_add()
462 thread_unlock(thread); in affinity_set_add()
476 thread_lock(thread); in affinity_set_remove()
[all …]
H A Dexclaves_panic.c132 kr = exclaves_run(thread, false); in exclaves_xnuproxy_panic_thread()
238 ex_thread->thread.address, ex_thread->thread.tss_base, in exclaves_append_panic_addl_info()
239 ex_thread->thread.ipc_buffer, ex_thread->thread.scheduling_context_id, in exclaves_append_panic_addl_info()
240 ex_thread->thread.execution_context_id, ex_thread->thread.endpoint_id, in exclaves_append_panic_addl_info()
241 ex_thread->thread.stack.start, ex_thread->thread.stack.size, in exclaves_append_panic_addl_info()
242 ex_thread->thread.stack.call_base, ex_thread->thread.registers.lr, in exclaves_append_panic_addl_info()
243 ex_thread->thread.registers.pc, ex_thread->thread.registers.sp, in exclaves_append_panic_addl_info()
271 ex_thread->thread.registers.pc, ex_thread->thread.registers.lr); in exclaves_panic_get_string()
336 thread_t thread = THREAD_NULL; in exclaves_panic_thread_setup() local
340 BASEPRI_DEFAULT, &thread); in exclaves_panic_thread_setup()
[all …]
H A Dkpc_thread.c134 if (thread->kpc_buf) { in kpc_update_thread_counters()
156 thread_t thread = current_thread(); in kpc_get_curthread_counters() local
165 if (!thread->kpc_buf) { in kpc_get_curthread_counters()
175 memcpy( buf, thread->kpc_buf, in kpc_get_curthread_counters()
191 kpc_off_cpu_internal(thread_t thread) in kpc_off_cpu_internal() argument
194 kpc_update_thread_counters(thread); in kpc_off_cpu_internal()
199 kpc_thread_create(thread_t thread) in kpc_thread_create() argument
211 kpc_thread_destroy(thread_t thread) in kpc_thread_destroy() argument
216 if (!thread->kpc_buf) { in kpc_thread_destroy()
221 buf = thread->kpc_buf; in kpc_thread_destroy()
[all …]
H A Dsched_clutch.c1238 thread_t thread) in sched_clutch_root_urgency_inc() argument
1258 thread_t thread) in sched_clutch_root_urgency_dec() argument
2696 sched_thread_sched_pri_promoted(thread) ? thread->sched_pri : thread->base_pri, false); in sched_clutch_thread_insert()
2830 return thread; in sched_clutch_thread_unbound_lookup()
2995 return thread; in sched_clutch_root_highest_foreign_thread_remove()
3000 return thread; in sched_clutch_root_highest_foreign_thread_remove()
3644 int pri = (sched_thread_sched_pri_promoted(thread)) ? thread->sched_pri : thread->base_pri; in sched_clutch_update_thread_bucket()
4184 return thread; in sched_edge_foreign_runnable_thread_remove()
4342 return thread; in sched_edge_processor_idle()
4359 return thread; in sched_edge_processor_idle()
[all …]
H A Dsched_amp.c279 thread_t thread, in sched_amp_processor_enqueue() argument
424 thread_t thread; in sched_amp_processor_queue_shutdown() local
443 remqueue(&thread->runq_links); in sched_amp_processor_queue_shutdown()
445 thread_lock(thread); in sched_amp_processor_queue_shutdown()
449 thread_unlock(thread); in sched_amp_processor_queue_shutdown()
456 thread_t thread) in sched_amp_processor_queue_remove() argument
468 run_queue_remove(rq, thread); in sched_amp_processor_queue_remove()
490 thread_t thread = THREAD_NULL; in sched_amp_steal_thread() local
527 return thread; in sched_amp_steal_thread()
538 thread_t thread; in sched_amp_thread_update_scan() local
[all …]
/xnu-11215/osfmk/arm64/
H A Dstatus.c308 thread_t thread) in thread_generate_sigreturn_token() argument
326 thread_t thread, in machine_thread_state_convert_to_user() argument
528 thread_t thread) in machine_thread_state_check_sigreturn_token() argument
575 thread_t thread, in machine_thread_state_convert_from_user() argument
792 thread_t thread, in machine_thread_siguctx_pointer_convert_to_user() argument
826 thread_t thread, in machine_thread_function_pointers_convert_from_user() argument
1780 if (thread && thread->machine.DebugData) { in find_debug_state32()
1790 if (thread && thread->machine.DebugData) { in find_debug_state64()
1816 bzero(thread->machine.DebugData, sizeof *(thread->machine.DebugData)); in find_or_allocate_debug_state64()
1842 bzero(thread->machine.DebugData, sizeof *(thread->machine.DebugData)); in find_or_allocate_debug_state32()
[all …]
H A Dpcb.c139 return thread->machine.usme; in machine_thread_get_sme_state()
356 thread = pgz_decode_allow_invalid(thread, ZONE_ID_THREAD); in machine_thread_on_core_allow_invalid()
357 if (thread == THREAD_NULL) { in machine_thread_on_core_allow_invalid()
360 thread_require(thread); in machine_thread_on_core_allow_invalid()
389 thread->machine.kpcb = NULL; in machine_thread_create()
445 bzero(&thread->machine.perfctrl_state, sizeof(thread->machine.perfctrl_state)); in machine_thread_create()
583 if (thread->machine.usme) { in machine_thread_sme_state_alloc()
585 thread, thread->machine.usme); in machine_thread_sme_state_alloc()
699 (uintptr_t)thread_tid(thread), thread->priority, thread->sched_pri, 0, 0); in machine_stack_detach()
705 thread->kernel_stack = 0; in machine_stack_detach()
[all …]
/xnu-11215/osfmk/kperf/
H A Dlazy.c55 kperf_lazy_off_cpu(thread_t thread) in kperf_lazy_off_cpu() argument
59 kperf_lazy_cpu_sample(thread, 0, 0); in kperf_lazy_off_cpu()
68 if (thread->last_run_time > thread->last_made_runnable_time) { in kperf_lazy_make_runnable()
88 if (thread->last_made_runnable_time < thread->last_run_time) { in kperf_lazy_wait_sample()
100 task_t task = get_threadtask(thread); in kperf_lazy_wait_sample()
102 .cur_thread = thread, in kperf_lazy_wait_sample()
126 if (!thread) { in kperf_lazy_cpu_sample()
127 thread = current_thread(); in kperf_lazy_cpu_sample()
145 thread->sched_pri, interrupt ? 1 : 0); in kperf_lazy_cpu_sample()
147 task_t task = get_threadtask(thread); in kperf_lazy_cpu_sample()
[all …]
H A Dthread_samplers.c67 int sched_state = thread->state; in kperf_thread_info_runmode_legacy()
137 thread_t thread = context->cur_thread; in kperf_thread_scheduling_sample() local
142 if (thread == current_thread()) { in kperf_thread_scheduling_sample()
147 times = recount_thread_times(thread); in kperf_thread_scheduling_sample()
153 thsc->kpthsc_state = thread->state; in kperf_thread_scheduling_sample()
154 thsc->kpthsc_base_priority = thread->base_pri; in kperf_thread_scheduling_sample()
229 thread_t thread = context->cur_thread; in kperf_thread_snapshot_sample() local
236 if (thread->effective_policy.thep_darwinbg) { in kperf_thread_snapshot_sample()
293 thread_t thread = context->cur_thread; in kperf_thread_dispatch_sample() local
296 (uintptr_t)thread_tid(thread)); in kperf_thread_dispatch_sample()
[all …]
H A Dkperf.h44 uint32_t kperf_get_thread_ast(thread_t thread);
45 void kperf_set_thread_ast(thread_t thread, uint32_t flags);
51 boolean_t kperf_thread_get_dirty(thread_t thread);
52 void kperf_thread_set_dirty(thread_t thread, boolean_t dirty);
105 kperf_on_cpu(thread_t thread, thread_continue_t continuation, in kperf_on_cpu() argument
113 kperf_on_cpu_internal(thread, continuation, starting_fp); in kperf_on_cpu()
121 kperf_off_cpu(thread_t thread) in kperf_off_cpu() argument
124 void kperf_lazy_off_cpu(thread_t thread); in kperf_off_cpu()
127 kperf_lazy_off_cpu(thread); in kperf_off_cpu()
135 kperf_make_runnable(thread_t thread, int interrupt) in kperf_make_runnable() argument
[all …]
/xnu-11215/tests/sched/sched_test_harness/shadow_headers/
H A Dmisc_needed_deps.c44 struct thread { struct
87 thread_clear_runq(thread_t thread) in thread_clear_runq() argument
89 thread_assert_runq_nonnull(thread); in thread_clear_runq()
90 thread->__runq.runq = PROCESSOR_NULL; in thread_clear_runq()
96 thread_assert_runq_null(thread); in thread_set_runq_locked()
97 thread->__runq.runq = new_runq; in thread_set_runq_locked()
103 return thread->__runq.runq; in thread_get_runq_locked()
108 thread_t thread) in thread_tid() argument
110 return thread != THREAD_NULL? thread->thread_id: 0; in thread_tid()
114 #define recount_thread_time_mach(thread) (thread->mock_recount_time.user_time + thread->mock_recoun… argument
[all …]
H A Dsched_prim.c126 thread_t thread; in run_queue_dequeue() local
130 thread = cqe_dequeue_head(queue, struct thread, runq_links); in run_queue_dequeue()
132 thread = cqe_dequeue_tail(queue, struct thread, runq_links); in run_queue_dequeue()
135 assert(thread != THREAD_NULL); in run_queue_dequeue()
137 thread_clear_runq(thread); in run_queue_dequeue()
147 return thread; in run_queue_dequeue()
161 thread_t thread, in run_queue_enqueue() argument
200 thread_t thread) in run_queue_remove() argument
218 thread_clear_runq(thread); in run_queue_remove()
235 thread_t thread = cqe_queue_first(queue, struct thread, runq_links); in run_queue_peek() local
[all …]
/xnu-11215/tests/sched/sched_test_harness/
H A Dsched_clutch_harness.c50 (void)thread; in sched_thread_sched_pri_promoted()
149 thread_t thread = malloc(sizeof(struct thread)); in impl_create_thread() local
150 track_allocated(thread); in impl_create_thread()
151 thread->base_pri = pri; in impl_create_thread()
152 thread->sched_pri = pri; in impl_create_thread()
153 thread->thread_group = tg; in impl_create_thread()
155 thread->bound_processor = NULL; in impl_create_thread()
156 thread->__runq.runq = PROCESSOR_NULL; in impl_create_thread()
158 return thread; in impl_create_thread()
178 curr_thread = thread; in impl_set_thread_current()
[all …]

12345678910>>...16