/macosx-10.10/xnu-2782.1.97/osfmk/kern/ |
H A D | priority.c | 74 #include <kern/thread.h> 86 * Recalculate the quantum and priority for a thread. 97 thread_t thread = p1; local 106 * We bill CPU time to both the individual thread and its task. 109 * thread, we must credit the ledger before taking the thread lock. The ledger 110 * pointers are only manipulated by the thread itself at the ast boundary. 112 ledger_credit(thread->t_ledger, task_ledgers.cpu_time, thread->quantum_remaining); 113 ledger_credit(thread 218 sched_set_thread_base_priority(thread_t thread, int priority) argument 237 lightweight_update_priority(thread_t thread) argument 316 compute_priority( register thread_t thread, boolean_t override_depress) argument 345 compute_my_priority( register thread_t thread) argument 372 can_update_priority( thread_t thread) argument 389 update_priority( register thread_t thread) argument 502 sched_share_incr(thread_t thread) argument 510 sched_share_decr(thread_t thread) argument 519 sched_background_incr(thread_t thread) argument 533 sched_background_decr(thread_t thread) argument 548 assert_thread_sched_count(thread_t thread) argument 588 sched_set_thread_mode(thread_t thread, sched_mode_t new_mode) argument 632 sched_thread_mode_demote(thread_t thread, uint32_t reason) argument 670 sched_thread_mode_undemote(thread_t thread, uint32_t reason) argument 710 sched_set_thread_throttled(thread_t thread, boolean_t wants_throttle) 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 668 thread_set_tsd_base( thread_t thread, mach_vm_offset_t tsd_base) argument 717 install_special_handler( thread_t thread) argument 736 install_special_handler_locked( thread_t thread) argument 778 thread_t thread = current_thread(); local 825 thread_t thread = current_thread(); local 856 special_handler( __unused ReturnHandler *rh, thread_t thread) argument 907 act_set_state( thread_t thread, int flavor, thread_state_t state, mach_msg_type_number_t count) argument 921 act_set_state_from_user( thread_t thread, int flavor, thread_state_t state, mach_msg_type_number_t count) argument 935 act_get_state( thread_t thread, int flavor, thread_state_t state, mach_msg_type_number_t *count) argument 948 act_set_ast( thread_t thread, ast_t ast) argument 975 act_set_astbsd( thread_t thread) argument 982 act_set_apc( thread_t thread) argument 989 act_set_kperf( thread_t thread) argument 1002 act_set_astmacf( thread_t thread) argument [all...] |
H A D | thread_policy.c | 34 #include <kern/thread.h> 49 * This table defines the starting base priority of the thread, 50 * which will be modified by the thread importance and the task max priority 62 * This table defines the highest IO priority that a thread marked with this 75 * a thread marked with this QoS class can have. 96 thread_recompute_qos(thread_t thread); 100 thread_t thread); 103 thread_set_user_sched_mode(thread_t thread, sched_mode_t mode); 109 extern void proc_get_thread_policy(thread_t thread, thread_policy_state_t info); 112 thread_has_qos_policy(thread_t thread) { argument 117 thread_remove_qos_policy(thread_t thread) argument 131 thread_is_static_param(thread_t thread) argument 197 thread_policy_set( thread_t thread, thread_policy_flavor_t flavor, thread_policy_t policy_info, mach_msg_type_number_t count) argument 245 thread_policy_set_internal( thread_t thread, thread_policy_flavor_t flavor, thread_policy_t policy_info, mach_msg_type_number_t count) argument 512 thread_set_mode_and_absolute_pri( thread_t thread, integer_t policy, integer_t priority) argument 605 thread_set_user_sched_mode(thread_t thread, sched_mode_t mode) argument 623 thread_recompute_qos(thread_t thread) argument 646 thread_update_qos_cpu_time(thread_t thread, boolean_t lock_needed) argument 782 thread_recompute_priority( thread_t thread) argument 833 thread_task_priority( thread_t thread, integer_t priority, integer_t max_priority) argument 873 thread_policy_reset( thread_t thread) argument 922 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> 155 static struct thread thread_template, init_thread; 159 thread_t thread); 188 * (ie when any thread's CPU consumption exceeds 70% of the limit, start taking user 205 * Fill in a template thread for fast initialization. 353 sizeof(struct thread), 354 thread_max * sizeof(struct thread), 355 THREAD_CHUNK * sizeof(struct thread), 393 thread_t thread = current_thread(); local 510 thread_deallocate( thread_t thread) argument 571 thread_t self, thread; local 649 thread_terminate_enqueue( thread_t thread) argument 670 thread_t thread; local 707 thread_stack_enqueue( thread_t thread) argument 721 thread_t thread = NULL; local 977 thread_t thread; local 1034 thread_t thread; local 1111 thread_t thread; local 1147 thread_t thread; local 1178 thread_t thread; local 1204 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 1416 thread_read_times( thread_t thread, time_value_t *user_time, time_value_t *system_time) argument 1452 thread_t thread = NULL; local 1468 thread_assign( __unused thread_t thread, __unused processor_set_t new_pset) argument 1482 thread_assign_default( thread_t thread) argument 1494 thread_get_assignment( thread_t thread, processor_set_t *pset) argument 1513 thread_wire_internal( host_priv_t host_priv, thread_t thread, boolean_t wired, boolean_t *prev_state) argument 1548 thread_wire( host_priv_t host_priv, thread_t thread, boolean_t wired) argument 1580 thread_guard_violation(thread_t thread, unsigned type) argument 1607 guard_ast(thread_t thread) argument 1650 thread_t thread = current_thread(); local 1776 thread_update_io_stats(thread_t thread, int size, int io_flags) argument 1841 thread_t thread = current_thread(); local 1896 thread_t thread = current_thread(); local 1981 sched_call_null( __unused int type, __unused thread_t thread) argument 1989 thread_sched_call( thread_t thread, sched_call_t call) argument 1997 thread_static_param( thread_t thread, boolean_t state) argument 2007 thread_tid( thread_t thread) argument 2021 thread_dispatchqaddr( thread_t thread) argument 2045 thread_reference( thread_t thread) argument 2074 thread_t thread = current_thread(); local 2131 thread_get_mach_voucher( thread_act_t thread, mach_voucher_selector_t __unused which, ipc_voucher_t *voucherp) argument 2201 thread_set_mach_voucher( thread_t thread, ipc_voucher_t voucher) argument 2253 thread_swap_mach_voucher( thread_t thread, ipc_voucher_t new_voucher, ipc_voucher_t *in_out_old_voucher) argument 2336 thread_t thread = current_thread(); local 2351 dtrace_get_thread_predcache(thread_t thread) argument 2359 dtrace_get_thread_vtime(thread_t thread) argument 2367 dtrace_get_thread_tracing(thread_t thread) argument 2375 dtrace_get_thread_reentering(thread_t thread) argument 2383 dtrace_get_kernel_stack(thread_t thread) argument 2391 dtrace_calc_thread_recent_vtime(thread_t thread) argument 2406 dtrace_set_thread_predcache(thread_t thread, uint32_t predcache) argument 2412 dtrace_set_thread_vtime(thread_t thread, int64_t vtime) argument 2418 dtrace_set_thread_tracing(thread_t thread, int64_t accum) argument 2424 dtrace_set_thread_reentering(thread_t thread, boolean_t vbool) argument 2434 dtrace_set_thread_recover(thread_t thread, vm_offset_t recover) argument 2450 thread_t thread = current_thread(); local 2462 dtrace_thread_didexec(thread_t thread) argument [all...] |
H A D | ast.c | 74 #include <kern/thread.h> 109 thread_t thread = current_thread(); local 133 if (!(thread->state & TH_IDLE)) { 138 wait_queue_assert_possible(thread) ) { 160 thread_ast_clear(thread, AST_BSD); 161 bsd_ast(thread); 169 thread_ast_clear(thread, AST_MACF); 170 mac_thread_userret(thread); 180 thread_ast_clear(thread, AST_GUARD); 181 guard_ast(thread); 242 thread_t thread = processor->active_thread; local [all...] |
H A D | sched_prim.c | 100 #include <kern/thread.h> 214 static inline void runq_consider_incr_bound_count(processor_t processor, thread_t thread) argument 216 if (thread->bound_processor == PROCESSOR_NULL) 219 assert(thread->bound_processor == processor); 228 static inline void runq_consider_decr_bound_count(processor_t processor, thread_t thread) argument 230 if (thread->bound_processor == PROCESSOR_NULL) 233 assert(thread->bound_processor == processor); 258 thread_t thread, 264 thread_t thread, 269 thread_t thread, 860 thread_t thread = p0; local 885 thread_unblock( thread_t thread, wait_result_t wresult) argument 1032 thread_go( thread_t thread, wait_result_t wresult) argument 1061 thread_mark_wait_locked( thread_t thread, wait_interrupt_t interruptible) argument 1117 thread_t thread = current_thread(); local 1136 thread_t thread; local 1180 thread_t thread = current_thread(); local 1223 thread_t thread = current_thread(); local 1269 thread_t thread = current_thread(); local 1305 thread_t thread = current_thread(); local 1347 thread_isoncpu(thread_t thread) argument 1384 thread_stop( thread_t thread, boolean_t until_not_runnable) argument 1469 thread_unstop( thread_t thread) argument 1511 thread_wait( thread_t thread, boolean_t until_not_runnable) argument 1576 clear_wait_internal( thread_t thread, wait_result_t wresult) argument 1625 clear_wait( thread_t thread, wait_result_t result) argument 1781 thread_select( thread_t thread, processor_t processor, ast_t reason) argument 1994 thread_select_idle( thread_t thread, processor_t processor) argument 2105 thread_t thread; local 2137 thread_t thread; local 2189 thread_invoke( thread_t self, thread_t thread, ast_t reason) argument 2456 thread_dispatch( thread_t thread, thread_t self) argument 2827 thread_continue( register thread_t thread) argument 2852 thread_quantum_init(thread_t thread) argument 2864 sched_traditional_initial_quantum_size(thread_t thread) argument 2921 sched_traditional_fairshare_enqueue(thread_t thread) argument 2939 thread_t thread; local 2959 sched_traditional_fairshare_queue_remove(thread_t thread) argument 3002 thread_t thread; local 3036 run_queue_enqueue( run_queue_t rq, thread_t thread, integer_t options) argument 3075 run_queue_remove( run_queue_t rq, thread_t thread) argument 3106 fairshare_setrun( processor_t processor, thread_t thread) argument 3130 realtime_queue_insert( thread_t thread) argument 3180 realtime_setrun( processor_t processor, thread_t thread) argument 3308 processor_enqueue( processor_t processor, thread_t thread, integer_t options) argument 3335 processor_setrun( processor_t processor, thread_t thread, integer_t options) argument 3624 choose_processor( processor_set_t pset, processor_t processor, thread_t thread) argument 3927 thread_setrun( thread_t thread, integer_t options) argument 4055 thread_t next, thread; local 4141 thread_t thread = processor->active_thread; local 4187 set_sched_pri( thread_t thread, int priority) argument 4274 processor_queue_remove( processor_t processor, thread_t thread) argument 4329 thread_run_queue_remove( thread_t thread) argument 4405 thread_t thread; local 4455 thread_t thread; local 4511 thread_get_urgency(thread_t thread, uint64_t *arg1, uint64_t *arg2) argument 4560 processor_idle( thread_t thread, processor_t processor) argument 4738 thread_t thread; local 4771 thread_t thread; local 4963 thread_update_add_thread(thread_t thread) argument 4978 thread_t thread = thread_update_array[--thread_update_count]; local 5004 register thread_t thread; local 5036 thread_t thread; local 5075 thread_eager_preemption(thread_t thread) argument 5081 thread_set_eager_preempt(thread_t thread) argument 5115 thread_clear_eager_preempt(thread_t thread) argument 5189 thread_runnable( thread_t thread) argument [all...] |
/macosx-10.10/dcerpc-61/dcerpc/libdcethread/ |
H A D | dcethread_kill.c | 89 dcethread_kill(dcethread* thread, int sig) argument 91 return dcethread__set_errno(pthread_kill(thread->pthread, sig)); 95 dcethread_kill_throw(dcethread* thread, int sig) argument 97 DCETHREAD_WRAP_THROW(dcethread_kill(thread, sig));
|
H A D | dcethread_detach.c | 88 dcethread_detach(dcethread *thread) argument 90 if (!thread->flag.joinable) 92 DCETHREAD_WARNING("Detaching implicit dcethread %p is ill-advised", thread); 95 dcethread__lock(thread); 96 dcethread__release(thread); 97 dcethread__unlock(thread); 103 dcethread_detach_throw(dcethread *thread) argument 105 DCETHREAD_WRAP_THROW(dcethread_detach(thread)); 122 dcethread* thread; local 124 MU_TRY_DCETHREAD( dcethread_create(&thread, NUL [all...] |
H A D | dcethread-private.c | 104 dcethread* thread = dcethread__self(); local 108 if (thread->flag.async) 110 dcethread__dispatchinterrupt(thread); 166 dcethread__interrupt_syscall(dcethread* thread, void* data ATTRIBUTE_UNUSED) argument 168 pthread_kill(thread->pthread, INTERRUPT_SIGNAL); 192 dcethread__interrupt_condwait(dcethread* thread, void* data) argument 198 DCETHREAD_TRACE("Thread %p: already owned mutex used for interrupt", thread); 201 DCETHREAD_ERROR("Thread %p: broadcast failed", thread); 206 DCETHREAD_TRACE("Thread %p: broadcast to interrupt condwait", thread); 215 DCETHREAD_ERROR("Thread %p: broadcast failed", thread); 238 dcethread* thread; local 268 dcethread* thread; local 288 dcethread__init_self(dcethread* thread) argument 300 dcethread__sanity(dcethread* thread) argument 326 dcethread__delete(dcethread* thread) argument 337 dcethread__retain(dcethread* thread) argument 352 dcethread__release(dcethread* thread) argument 367 dcethread__lock(dcethread* thread) argument 377 dcethread__unlock(dcethread* thread) argument 399 dcethread__wait(dcethread* thread) argument 409 dcethread__timedwait(dcethread* thread, struct timespec* ts) argument 435 dcethread__change_state(dcethread* thread, int state) argument 468 dcethread__dispatchinterrupt(dcethread* thread) argument 475 dcethread__interrupt(dcethread* thread) argument 529 dcethread__set_interrupt_handler(dcethread* thread, void (*handle_interrupt)(dcethread*, void*), void* data) argument 536 dcethread__begin_block(dcethread* thread, int (*interrupt)(dcethread*, void*), void* data, int (**old_interrupt)(dcethread*, void*), void** old_data) argument 573 dcethread__poll_end_block(dcethread* thread, int (*interrupt)(dcethread*, void*), void* data) argument 599 dcethread__end_block(dcethread* thread, int (*interrupt)(dcethread*, void*), void* data) argument [all...] |
H A D | dcethread_enableasync.c | 88 dcethread* thread = dcethread__self(); local 91 dcethread__lock(thread); 92 old = thread->flag.async; 93 thread->flag.async = on; 94 dcethread__unlock(thread);
|
H A D | dcethread_enableinterrupt.c | 88 dcethread* thread = dcethread__self(); local 91 dcethread__lock(thread); 92 old = thread->flag.interruptible; 93 thread->flag.interruptible = on; 94 dcethread__unlock(thread);
|
H A D | dcethread-private.h | 90 /* Current state of thread 118 /* Is the thread currently interruptible? */ 120 /* Is the thread currently locked? (for debugging) */ 127 /* Function to perform an interruption on this thread. 130 Returns 1 if the thread is definitely interrupted, 132 int (*interrupt)(dcethread* thread, void* data); 138 This function is invoked within this thread when 141 void (*handle_interrupt)(dcethread* thread, void* data); 161 void dcethread__delete(dcethread* thread); 163 void dcethread__init_self(dcethread* thread); [all...] |
H A D | dcethread_getprio.c | 86 dcethread_getprio(dcethread* thread) argument 91 if (dcethread__set_errno(pthread_getschedparam(thread->pthread, &policy, &sp))) 100 dcethread_getprio_throw(dcethread* thread) argument 102 DCETHREAD_WRAP_THROW(dcethread_getprio(thread));
|
H A D | dcethread_checkinterrupt.c | 89 dcethread* thread = dcethread__self(); local 93 dcethread__lock(thread); 94 state = thread->state; 95 interruptible = thread->flag.interruptible; 99 dcethread__change_state(thread, DCETHREAD_STATE_ACTIVE); 102 dcethread__unlock(thread); 106 dcethread__dispatchinterrupt(thread); 120 properly clear the interrupted state of the thread */
|
H A D | dcethread_exit.c | 89 dcethread* thread = dcethread__self(); local 91 dcethread__lock(thread); 92 thread->status = status; 93 dcethread__unlock(thread); 125 dcethread* thread; local 128 MU_TRY_DCETHREAD( dcethread_create(&thread, NULL, basic_thread, (void*) 0xDEADBEEF) ); 129 MU_TRY_DCETHREAD( dcethread_join(thread, &status) );
|
H A D | dcethread_join.c | 86 int interrupt_join(dcethread* thread ATTRIBUTE_UNUSED, void* data); 89 interrupt_join(dcethread* thread ATTRIBUTE_UNUSED, void* data) 105 dcethread_join(dcethread* thread, void **status) argument 110 if (thread == dcethread__self()) 115 if (!thread->flag.joinable) 117 DCETHREAD_WARNING("Joining implicit dcethread %p is ill-advised", thread); 120 /* Begin our blocking wait on the other thread */ 121 if (dcethread__begin_block(dcethread__self(), interrupt_join, (void*) thread, &old_interrupt, &old_data)) 126 /* Lock the other thread in preparation for waiting on its state condition */ 127 dcethread__lock(thread); 160 dcethread_join_throw(dcethread* thread, void **status) argument 179 dcethread* thread; local 229 dcethread* thread; local 238 dcethread* thread; local [all...] |
H A D | dcethread_setprio.c | 86 dcethread_setprio(dcethread* thread, int priority) argument 91 if (dcethread__set_errno(pthread_getschedparam(thread->pthread, &policy, &sp))) 99 if (dcethread__set_errno(pthread_setschedparam(thread->pthread, policy, &sp))) 108 dcethread_setprio_throw(dcethread* thread, int priority) argument 110 DCETHREAD_WRAP_THROW(dcethread_setprio(thread, priority));
|
H A D | dcethread_pause.c | 126 dcethread* thread; local 128 MU_TRY_DCETHREAD( dcethread_create(&thread, NULL, basic_thread, NULL) ); 129 MU_TRY_DCETHREAD( dcethread_interrupt(thread) ); 130 MU_TRY_DCETHREAD( dcethread_join(thread, NULL) ); 135 dcethread* thread; local 141 MU_TRY_DCETHREAD( dcethread_create(&thread, NULL, basic_thread, NULL) ); 143 MU_TRY_DCETHREAD( dcethread_interrupt(thread) ); 144 MU_TRY_DCETHREAD( dcethread_join(thread, NULL) );
|
H A D | dcethread_interrupt.c | 88 dcethread_interrupt(dcethread* thread) argument 90 dcethread__lock(thread); 91 dcethread__interrupt(thread); 92 dcethread__unlock(thread); 98 dcethread_interrupt_throw(dcethread* thread) argument 100 DCETHREAD_WRAP_THROW(dcethread_interrupt(thread)); 137 dcethread* thread; local 139 MU_TRY_DCETHREAD( dcethread_create(&thread, NULL, basic_thread, NULL) ); 140 MU_TRY_DCETHREAD( dcethread_interrupt(thread) ); 141 MU_TRY_DCETHREAD( dcethread_join(thread, NUL 217 dcethread* thread = NULL; local [all...] |
H A D | dcethread_create.c | 125 dcethread* thread; local 136 start_args->self = thread = dcethread__new(); 138 /* Record if this thread was created joinably */ 141 thread->flag.joinable = 1; 144 /* If thread is joinable, give it an extra reference */ 145 if (thread->flag.joinable) 147 thread->refs++; 150 if (dcethread__set_errno(pthread_create((pthread_t*) &thread->pthread, attr, proxy_start, start_args))) 152 dcethread__delete(thread); 157 DCETHREAD_TRACE("Thread %p: created (pthread %lu)", thread, (unsigne 196 dcethread* thread = NULL; local [all...] |
/macosx-10.10/xnu-2782.1.97/osfmk/chud/ |
H A D | chud_thread.h | 33 #include <kern/thread.h>
|
/macosx-10.10/xnu-2782.1.97/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)))
|
/macosx-10.10/bmalloc-7600.1.17/bmalloc/ |
H A D | StaticMutex.cpp | 27 #include <thread>
|
/macosx-10.10/xnu-2782.1.97/security/ |
H A D | mac_mach_internal.h | 67 struct label *mac_thread_get_threadlabel(struct thread *thread); 75 void act_set_astmacf(struct thread *); 76 void mac_thread_userret(struct thread *);
|
/macosx-10.10/xnu-2782.1.97/bsd/kern/ |
H A D | ast.h | 37 #include <kern/thread.h>
|