/darwin-on-arm/xnu/osfmk/kern/ |
H A D | priority.c | 74 #include <kern/thread.h> 82 * Recalculate the quantum and priority for a thread. 93 thread_t thread = p1; local 99 * We bill CPU time to both the individual thread and its task. 102 * thread, we must credit the ledger before taking the thread lock. The ledger 103 * pointers are only manipulated by the thread itself at the ast boundary. 105 ledger_credit(thread->t_ledger, task_ledgers.cpu_time, thread->current_quantum); 106 ledger_credit(thread 222 lightweight_update_priority(thread_t thread) argument 318 set_priority( register thread_t thread, register int priority) argument 338 compute_priority( register thread_t thread, boolean_t override_depress) argument 368 compute_my_priority( register thread_t thread) argument 386 can_update_priority( thread_t thread) argument 403 update_priority( register thread_t thread) argument [all...] |
H A D | thread_act.c | 63 #include <kern/thread.h> 88 * Internal routine to mark a thread as started. 89 * Always called with the thread locked. 95 * of the newly created thread. Commented out for now, in case we 100 thread_t thread) 102 clear_wait(thread, THREAD_AWAKENED); 103 thread->started = TRUE; 104 // DTRACE_PROC1(lwp__start, thread_t, thread); 108 * Internal routine to terminate a thread. 113 thread_t thread) 99 thread_start_internal( thread_t thread) argument 112 thread_terminate_internal( thread_t thread) argument 148 thread_terminate( thread_t thread) argument 185 thread_hold( register thread_t thread) argument 202 thread_release( register thread_t thread) argument 216 thread_suspend( register thread_t thread) argument 247 thread_resume( register thread_t thread) argument 285 thread_depress_abort( register thread_t thread) argument 313 act_abort( thread_t thread) argument 332 thread_abort( register thread_t thread) argument 355 thread_abort_safely( thread_t thread) argument 393 thread_info( thread_t thread, thread_flavor_t flavor, thread_info_t thread_info_out, mach_msg_type_number_t *thread_info_count) argument 418 thread_get_state( register thread_t thread, int flavor, thread_state_t state, mach_msg_type_number_t *state_count) argument 467 thread_set_state_internal( register thread_t thread, int flavor, thread_state_t state, mach_msg_type_number_t state_count, boolean_t from_user) argument 524 thread_set_state( register thread_t thread, int flavor, thread_state_t state, mach_msg_type_number_t state_count) argument 534 thread_set_state_from_user( register thread_t thread, int flavor, thread_state_t state, mach_msg_type_number_t state_count) argument 551 thread_state_initialize( register thread_t thread) argument 638 thread_setstatus( register thread_t thread, int flavor, thread_state_t tstate, mach_msg_type_number_t count) argument 654 thread_getstatus( register thread_t thread, int flavor, thread_state_t tstate, mach_msg_type_number_t *count) argument 672 install_special_handler( thread_t thread) argument 691 install_special_handler_locked( thread_t thread) argument 733 thread_t thread = current_thread(); local 780 thread_t thread = current_thread(); local 811 special_handler( __unused ReturnHandler *rh, thread_t thread) argument 862 act_set_state( thread_t thread, int flavor, thread_state_t state, mach_msg_type_number_t count) argument 876 act_set_state_from_user( thread_t thread, int flavor, thread_state_t state, mach_msg_type_number_t count) argument 890 act_get_state( thread_t thread, int flavor, thread_state_t state, mach_msg_type_number_t *count) argument 903 act_set_ast( thread_t thread, ast_t ast) argument 930 act_set_astbsd( thread_t thread) argument 937 act_set_apc( thread_t thread) argument 944 act_set_kperf( thread_t thread) argument 957 act_set_astmacf( thread_t thread) argument [all...] |
H A D | thread_policy.c | 34 #include <kern/thread.h> 39 thread_t thread); 44 thread_t thread, 47 extern int mach_do_background_thread(thread_t thread, int prio); 53 thread_t thread, 59 if (thread == THREAD_NULL) 62 if (thread->static_param) 65 return (thread_policy_set_internal(thread, flavor, policy_info, count)); 70 thread_t thread, 78 thread_mtx_lock(thread); 52 thread_policy_set( thread_t thread, thread_policy_flavor_t flavor, thread_policy_t policy_info, mach_msg_type_number_t count) argument 69 thread_policy_set_internal( thread_t thread, thread_policy_flavor_t flavor, thread_policy_t policy_info, mach_msg_type_number_t count) argument 253 thread_recompute_priority( thread_t thread) argument 288 thread_throttle( thread_t thread, integer_t task_priority) argument 322 thread_task_priority( thread_t thread, integer_t priority, integer_t max_priority) argument 348 thread_policy_reset( thread_t thread) argument 382 thread_policy_get( thread_t thread, thread_policy_flavor_t flavor, thread_policy_t policy_info, mach_msg_type_number_t *count, boolean_t *get_default) argument [all...] |
H A D | thread.c | 59 * File: kern/thread.c 93 #include <machine/thread.h> 114 #include <kern/thread.h> 148 static struct thread thread_template, init_thread; 152 thread_t thread); 173 * Fill in a template thread for fast initialization. 285 sizeof(struct thread), 286 thread_max * sizeof(struct thread), 287 THREAD_CHUNK * sizeof(struct thread), 291 lck_grp_init(&thread_lck_grp, "thread", 318 thread_t thread = current_thread(); local 427 thread_deallocate( thread_t thread) argument 476 thread_t self, thread; local 548 thread_terminate_enqueue( thread_t thread) argument 567 thread_t thread; local 600 thread_stack_enqueue( thread_t thread) argument 614 thread_t thread = NULL; local 844 thread_t thread; local 901 thread_t thread; local 978 thread_t thread; local 1014 thread_t thread; local 1048 thread_t thread; local 1080 thread_t thread; local 1097 thread_info_internal( register thread_t thread, thread_flavor_t flavor, thread_info_t thread_info_out, mach_msg_type_number_t *thread_info_count) argument 1309 thread_read_times( thread_t thread, time_value_t *user_time, time_value_t *system_time) argument 1342 thread_assign( __unused thread_t thread, __unused processor_set_t new_pset) argument 1356 thread_assign_default( thread_t thread) argument 1368 thread_get_assignment( thread_t thread, processor_set_t *pset) argument 1387 thread_wire_internal( host_priv_t host_priv, thread_t thread, boolean_t wired, boolean_t *prev_state) argument 1422 thread_wire( host_priv_t host_priv, thread_t thread, boolean_t wired) argument 1433 thread_t thread = current_thread(); local 1482 thread_t thread = current_thread(); local 1670 sched_call_null( __unused int type, __unused thread_t thread) argument 1678 thread_sched_call( thread_t thread, sched_call_t call) argument 1686 thread_static_param( thread_t thread, boolean_t state) argument 1696 thread_tid( thread_t thread) argument 1712 thread_dispatchqaddr( thread_t thread) argument 1736 thread_reference( thread_t thread) argument 1753 dtrace_get_thread_predcache(thread_t thread) argument 1761 dtrace_get_thread_vtime(thread_t thread) argument 1769 dtrace_get_thread_tracing(thread_t thread) argument 1777 dtrace_get_thread_reentering(thread_t thread) argument 1785 dtrace_get_kernel_stack(thread_t thread) argument 1793 dtrace_calc_thread_recent_vtime(thread_t thread) argument 1808 dtrace_set_thread_predcache(thread_t thread, uint32_t predcache) argument 1814 dtrace_set_thread_vtime(thread_t thread, int64_t vtime) argument 1820 dtrace_set_thread_tracing(thread_t thread, int64_t accum) argument 1826 dtrace_set_thread_reentering(thread_t thread, boolean_t vbool) argument 1836 dtrace_set_thread_recover(thread_t thread, vm_offset_t recover) argument [all...] |
H A D | sched_fixedpriority.c | 55 #include <kern/thread.h> 92 sched_fixedpriority_compute_priority(thread_t thread, 98 thread_t thread); 104 thread_t thread, 114 thread_t thread); 131 sched_fixedpriority_initial_quantum_size(thread_t thread); 140 sched_fixedpriority_can_update_priority(thread_t thread); 143 sched_fixedpriority_update_priority(thread_t thread); 146 sched_fixedpriority_lightweight_update_priority(thread_t thread); 149 sched_fixedpriority_quantum_expire(thread_t thread); 258 runq_consider_incr_bound_count(processor_t processor, thread_t thread) argument 272 runq_consider_decr_bound_count(processor_t processor, thread_t thread) argument 382 thread_t thread; local 402 sched_fixedpriority_compute_priority(thread_t thread, boolean_t override_depress) argument 414 sched_fixedpriority_choose_processor( processor_set_t pset, processor_t processor, thread_t thread) argument 421 sched_fixedpriority_processor_enqueue( processor_t processor, thread_t thread, integer_t options) argument 441 thread_t thread; local 471 sched_fixedpriority_processor_queue_remove( processor_t processor, thread_t thread) argument 611 sched_fixedpriority_update_priority(thread_t thread) argument 747 sched_fixedpriority_quantum_expire( thread_t thread) argument [all...] |
H A D | sched_prim.c | 96 #include <kern/thread.h> 186 static inline void runq_consider_incr_bound_count(processor_t processor, thread_t thread) argument 188 if (thread->bound_processor == PROCESSOR_NULL) 191 assert(thread->bound_processor == processor); 200 static inline void runq_consider_decr_bound_count(processor_t processor, thread_t thread) argument 202 if (thread->bound_processor == PROCESSOR_NULL) 205 assert(thread->bound_processor == processor); 230 thread_t thread, 235 thread_t thread, 240 thread_t thread, 776 thread_t thread = p0; local 805 thread_t thread = current_thread(); local 825 thread_t thread = current_thread(); local 842 thread_t thread = current_thread(); local 868 thread_unblock( thread_t thread, wait_result_t wresult) argument 1001 thread_go( thread_t thread, wait_result_t wresult) argument 1030 thread_mark_wait_locked( thread_t thread, wait_interrupt_t interruptible) argument 1086 thread_t thread = current_thread(); local 1105 thread_t thread; local 1148 thread_t thread = current_thread(); local 1183 thread_t thread = current_thread(); local 1301 thread_stop( thread_t thread) argument 1373 thread_unstop( thread_t thread) argument 1412 thread_isoncpu(thread_t thread) argument 1425 thread_wait( thread_t thread, boolean_t until_not_runnable) argument 1490 clear_wait_internal( thread_t thread, wait_result_t wresult) argument 1539 clear_wait( thread_t thread, wait_result_t result) argument 1628 thread_select( thread_t thread, processor_t processor) argument 1858 thread_select_idle( thread_t thread, processor_t processor) argument 1960 thread_t thread; local 1992 thread_t thread; local 2063 thread_invoke( register thread_t self, register thread_t thread, ast_t reason) argument 2316 thread_dispatch( thread_t thread, thread_t self) argument 2631 thread_continue( register thread_t thread) argument 2658 thread_quantum_init(thread_t thread) argument 2669 sched_traditional_initial_quantum_size(thread_t thread) argument 2728 sched_traditional_fairshare_enqueue(thread_t thread) argument 2746 thread_t thread; local 2766 sched_traditional_fairshare_queue_remove(thread_t thread) argument 2809 thread_t thread; local 2843 run_queue_enqueue( run_queue_t rq, thread_t thread, integer_t options) argument 2883 run_queue_remove( run_queue_t rq, thread_t thread) argument 2914 fairshare_setrun( processor_t processor, thread_t thread) argument 2937 realtime_queue_insert( thread_t thread) argument 2987 realtime_setrun( processor_t processor, thread_t thread) argument 3047 processor_enqueue( processor_t processor, thread_t thread, integer_t options) argument 3074 processor_setrun( processor_t processor, thread_t thread, integer_t options) argument 3290 choose_processor( processor_set_t pset, processor_t processor, thread_t thread) argument 3520 thread_setrun( thread_t thread, integer_t options) argument 3641 thread_t next, thread; local 3703 thread_t thread = processor->active_thread; local 3740 set_sched_pri( thread_t thread, int priority) argument 3803 processor_queue_remove( processor_t processor, thread_t thread) argument 3847 thread_run_queue_remove( thread_t thread) argument 3921 thread_t thread; local 3971 thread_t thread; local 4021 thread_t thread; local 4070 processor_idle( thread_t thread, processor_t processor) argument 4221 thread_t thread; local 4253 thread_t thread; local 4359 register thread_t thread; local 4390 thread_t thread; local 4444 thread_eager_preemption(thread_t thread) argument 4450 thread_set_eager_preempt(thread_t thread) argument 4484 thread_clear_eager_preempt(thread_t thread) argument 4559 thread_runnable( thread_t thread) argument [all...] |
H A D | ast.c | 77 #include <kern/thread.h> 108 thread_t thread = current_thread(); local 132 if (!(thread->state & TH_IDLE)) { 137 wait_queue_assert_possible(thread) ) { 159 thread_ast_clear(thread, AST_BSD); 160 bsd_ast(thread); 168 thread_ast_clear(thread, AST_MACF); 169 mac_thread_userret(thread); 179 thread_ast_clear(thread, AST_LEDGER); 180 ledger_ast(thread); 218 thread_t thread = processor->active_thread; local [all...] |
H A D | mk_sp.c | 45 #include <kern/thread.h> 57 #include <kern/thread.h> 65 * Set scheduling policy & priority for thread. 69 thread_t thread, 75 if ( thread == THREAD_NULL || 79 if (thread->static_param) 87 thread_lock(thread); 89 if ( (thread->sched_mode != TH_MODE_REALTIME) && 90 (thread->saved_mode != TH_MODE_REALTIME) ) { 91 if (!(thread 68 thread_policy_common( thread_t thread, integer_t policy, integer_t priority) argument 167 thread_set_policy( thread_t thread, processor_set_t pset, policy_t policy, policy_base_t base, mach_msg_type_number_t base_count, policy_limit_t limit, mach_msg_type_number_t limit_count) argument 277 thread_policy( thread_t thread, policy_t policy, policy_base_t base, mach_msg_type_number_t count, boolean_t set_limit) argument [all...] |
H A D | syscall_subr.h | 71 thread_t thread); 74 void *thread,
|
H A D | sched_grrr.c | 55 #include <kern/thread.h> 74 thread_t thread); 83 thread_t thread); 131 sched_grrr_compute_priority(thread_t thread, 137 thread_t thread); 142 thread_t thread, 152 thread_t thread); 169 sched_grrr_initial_quantum_size(thread_t thread); 178 sched_grrr_can_update_priority(thread_t thread); 181 sched_grrr_update_priority(thread_t thread); 327 sched_grrr_compute_priority(thread_t thread, boolean_t override_depress __unused) argument 334 sched_grrr_choose_processor( processor_set_t pset, processor_t processor, thread_t thread) argument 342 sched_grrr_processor_enqueue( processor_t processor, thread_t thread, integer_t options __unused) argument 362 thread_t thread; local 392 sched_grrr_processor_queue_remove( processor_t processor, thread_t thread) argument 586 thread_t thread; local 612 thread_t thread; local 708 grrr_enqueue( grrr_run_queue_t rq, thread_t thread) argument 757 thread_t thread; local 798 grrr_remove( grrr_run_queue_t rq, thread_t thread) argument 905 sched_grrr_fairshare_enqueue(thread_t thread) argument 918 thread_t thread; local 933 sched_grrr_fairshare_queue_remove(thread_t thread) argument [all...] |
H A D | sched_prim.h | 74 #include <kern/thread.h> 86 /* Force a preemption point for a thread and wait for it to stop running */ 88 thread_t thread); 92 thread_t thread); 94 /* Wait for a thread to stop running */ 96 thread_t thread, 99 /* Unblock thread on wake up */ 101 thread_t thread, 104 /* Unblock and dispatch thread */ 106 thread_t thread, [all...] |
H A D | startup.c | 90 #include <kern/thread.h> 125 thread_t thread); 170 thread_t thread; local 235 * Initialize the IPC, task, and thread subsystems. 244 * Create a kernel thread to execute the kernel bootstrap. 247 result = kernel_thread_create((thread_continue_t)kernel_bootstrap_thread, NULL, MAXPRI_KERNEL, &thread); 251 thread->state = TH_RUN; 252 thread_deallocate(thread); 255 load_context(thread); 264 * Now running in a thread 435 thread_t thread; local 487 load_context( thread_t thread) argument [all...] |
H A D | thread.h | 59 * File: thread.h 126 #include <machine/thread.h> 128 struct thread { struct 130 * NOTE: The runq field in the thread structure has an unusual 135 * When the thread is on a wait queue, these first three fields 145 integer_t options; /* options set by thread itself */ 151 #define TH_OPT_PRVT_CPULIMIT 0x40 /* Thread has a thread-private CPU limit applied to it */ 152 #define TH_OPT_IDLE_THREAD 0x0080 /* Thread is a per-processor idle thread */ 156 decl_simple_lock_data(,wake_lock) /* for thread stop / wait (wake_lock()) */ 161 * may be examined by this thread 658 thread_set_tag_internal(thread_t thread, uint16_t tag) argument 661 thread_get_tag_internal(thread_t thread) argument [all...] |
H A D | affinity.c | 46 * and its thread membership. This includes its destruction when the task 48 * - The thread mutex protects a thread's affinity set membership, but in 49 * addition, the thread_lock is taken to write thread->affinity_set since this 52 * The lock ordering is: task lock, thread mutex, namespace mutex, thread lock. 74 static void affinity_set_add(affinity_set_t aset, thread_t thread); 75 static affinity_set_t affinity_set_remove(affinity_set_t aset, thread_t thread); 95 * Return the affinity tag for a thread. 96 * Called with the thread mute 99 thread_affinity_get(thread_t thread) argument 118 thread_affinity_set(thread_t thread, uint32_t tag) argument 334 thread_affinity_terminate(thread_t thread) argument 355 thread_affinity_exec(thread_t thread) argument 436 affinity_set_add(affinity_set_t aset, thread_t thread) argument 456 affinity_set_remove(affinity_set_t aset, thread_t thread) argument [all...] |
H A D | syscall_subr.c | 70 #include <kern/thread.h> 102 * This boolean can be used by a thread waiting on a 103 * lock or condition: If FALSE is returned, the thread is justified 106 * returned, the thread should make one more check on the 218 * Context switch. User may supply thread hint. 224 register thread_t thread, self = current_thread(); local 256 thread = convert_port_to_thread(port); 259 if (thread == self) { 260 (void)thread_deallocate_internal(thread); 261 thread 386 thread_t thread = p0; local 403 thread_depress_abort_internal( thread_t thread) argument [all...] |
/darwin-on-arm/xnu/osfmk/chud/ |
H A D | chud_thread.h | 33 #include <kern/thread.h>
|
H A D | chud_thread.c | 35 #include <kern/thread.h> 58 #pragma mark **** thread binding **** 62 * This method will bind a given thread to the requested CPU starting at the 63 * next time quantum. If the thread is the current thread, this method will 65 * current thread, you will be on the requested CPU when this method returns. 68 chudxnu_bind_thread(thread_t thread, int cpu, __unused int options) argument 76 if(thread != current_thread()) 91 * If we're trying to bind the current thread, and 93 * context, block the current thread t 106 chudxnu_unbind_thread(thread_t thread, __unused int options) argument 114 chudxnu_thread_get_idle(thread_t thread) argument 126 chudxnu_thread_get_scheduler_state(thread_t thread) argument 251 thread_t thread, *thread_list = (thread_t *)addr; local 331 thread_t thread; local 509 chudxnu_task_for_thread(thread_t thread) argument 515 chudxnu_thread_info( thread_t thread, thread_flavor_t flavor, thread_info_t thread_info_out, mach_msg_type_number_t *thread_info_count) argument 528 chudxnu_thread_get_marked(thread_t thread) argument 536 chudxnu_thread_set_marked(thread_t thread, boolean_t new_value) argument 562 chudxnu_thread_ast(thread_t thread) argument 597 chudxnu_set_thread_bits( thread_t thread, uint32_t bits ) argument 607 chudxnu_thread_get_dirty(thread_t thread) argument 616 chudxnu_thread_set_dirty(thread_t thread, boolean_t makedirty) argument [all...] |
/darwin-on-arm/xnu/osfmk/mach/ |
H A D | thread_special_ports.h | 61 * Defines codes for special_purpose thread ports. These are NOT 70 #define THREAD_KERNEL_PORT 1 /* Represents the thread to the outside 77 #define thread_get_kernel_port(thread, port) \ 78 (thread_get_special_port((thread), THREAD_KERNEL_PORT, (port))) 80 #define thread_set_kernel_port(thread, port) \ 81 (thread_set_special_port((thread), THREAD_KERNEL_PORT, (port)))
|
/darwin-on-arm/xnu/bsd/kern/ |
H A D | ast.h | 37 #include <kern/thread.h>
|
/darwin-on-arm/xnu/osfmk/kperf/ |
H A D | kperf.h | 35 extern uint32_t kperf_get_thread_bits( thread_t thread ); 36 extern void kperf_set_thread_bits( thread_t thread, uint32_t bits ); 37 extern void kperf_set_thread_ast( thread_t thread );
|
/darwin-on-arm/xnu/osfmk/machine/ |
H A D | pal_routines.h | 45 extern void pal_dbg_page_fault( thread_t thread, user_addr_t vadddr, 52 void pal_syscall_restart(thread_t thread, arm_saved_state_t *state); 55 void pal_execve_return(thread_t thread); 58 void pal_thread_terminate_self(thread_t thread); 61 void pal_ast_check(thread_t thread);
|
/darwin-on-arm/xnu/osfmk/arm/ |
H A D | pcb.c | 31 * ARM thread support 42 #include <kern/thread.h> 73 static void save_vfp_context(thread_t thread); 78 * Set current thread identifier to the cthread identifier. 88 * Set current thread identifier to the specified thread_t. 98 * Set current thread to the specified thread_t. 100 void machine_set_current_thread(thread_t thread) argument 103 * Set the current thread. 105 CurrentThread = thread; 107 arm_set_threadpid_user_readonly((uint32_t *) thread 129 machine_thread_inherit_taskwide(thread_t thread, task_t parent_task) argument 139 machine_thread_create(thread_t thread, task_t task) argument 272 save_vfp_context(thread_t thread) argument 286 machine_stack_attach(thread_t thread, vm_offset_t stack) argument 309 machine_stack_detach(thread_t thread) argument 361 machine_thread_destroy(thread_t thread) argument 370 machine_thread_state_initialize(thread_t thread) argument 384 find_user_regs(thread_t thread) argument [all...] |
H A D | pal.c | 59 void pal_dbg_page_fault(thread_t thread __unused, user_addr_t vaddr __unused, 70 void pal_set_signal_delivery(thread_t thread __unused) 74 void pal_ast_check(thread_t thread) argument
|
H A D | status.c | 47 #include <kern/thread.h> 64 * dependent thread state info. 66 kern_return_t thread_userstack(thread_t thread, int flavor, argument 111 * Set the current thread entry point. 113 kern_return_t thread_entrypoint(thread_t thread, int flavor, argument 144 kern_return_t thread_userstackdefault(thread_t thread, argument 154 * Get the status of the specified thread. 254 * Set the current thread state. 256 kern_return_t machine_thread_set_state(thread_t thread, thread_flavor_t flavor, argument 288 assert(thread ! 355 thread_setuserstack(thread_t thread, mach_vm_address_t user_stack) argument 366 thread_adjuserstack(thread_t thread, int adj) argument 378 thread_setentrypoint(thread_t thread, uint32_t entry) argument 480 thread_set_wq_state32(thread_t thread, thread_state_t tstate) argument [all...] |
/darwin-on-arm/xnu/osfmk/arm64/ |
H A D | thread_initialize.c | 30 * ARM thread support 41 #include <kern/thread.h> 58 static void save_vfp_context(thread_t thread); 63 * Set current thread identifier to the cthread identifier. 72 * Set current thread identifier to the specified thread_t. 81 * Set current thread to the specified thread_t. 83 void machine_set_current_thread(thread_t thread) argument 85 /* Set the current thread. */ 86 CurrentThread = thread; 112 kern_return_t machine_thread_inherit_taskwide(thread_t thread, task_ argument 122 machine_thread_create(thread_t thread, task_t task) argument 253 save_vfp_context(thread_t thread) argument 267 machine_stack_attach(thread_t thread, vm_offset_t stack) argument 295 machine_stack_detach(thread_t thread) argument 343 machine_thread_destroy(thread_t thread) argument 353 machine_thread_state_initialize(thread_t thread) argument [all...] |