Searched refs:thread (Results 26 - 50 of 260) sorted by relevance

1234567891011

/xnu-2782.1.97/osfmk/kern/
H A Dsched_dualq.c45 #include <kern/thread.h>
59 sched_dualq_processor_enqueue(processor_t processor, thread_t thread, integer_t options);
62 sched_dualq_processor_queue_remove(processor_t processor, thread_t thread);
150 static inline run_queue_t dualq_runq_for_thread(processor_t processor, thread_t thread) argument
152 if (thread->bound_processor == PROCESSOR_NULL) {
155 assert(thread->bound_processor == processor);
221 thread_t thread,
224 run_queue_t rq = dualq_runq_for_thread(processor, thread);
227 result = run_queue_enqueue(rq, thread, options);
228 thread
219 sched_dualq_processor_enqueue( processor_t processor, thread_t thread, integer_t options) argument
321 thread_t thread; local
349 sched_dualq_processor_queue_remove( processor_t processor, thread_t thread) argument
385 thread_t thread; local
415 thread_t thread; local
[all...]
H A Dstartup.c92 #include <kern/thread.h>
162 thread_t thread);
240 thread_t thread; local
311 * Initialize the IPC, task, and thread subsystems.
342 * Create a kernel thread to execute the kernel bootstrap.
345 result = kernel_thread_create((thread_continue_t)kernel_bootstrap_thread, NULL, MAXPRI_KERNEL, &thread);
349 thread->state = TH_RUN;
350 thread_deallocate(thread);
353 load_context(thread);
363 * Now running in a thread
593 thread_t thread; local
645 load_context( thread_t thread) argument
[all...]
H A Dtask_policy.c57 * This subsystem manages task and thread IO priority and backgrounding,
77 * Here are the steps to change a policy on a task or thread:
108 * Changing task policy on a task or thread takes the task lock, and not the thread lock.
109 * TODO: Should changing policy on a thread take the thread lock instead?
123 extern void thread_recompute_qos(thread_t thread);
126 static void proc_set_task_policy_locked(task_t task, thread_t thread, int category, int flavor, int value);
127 static void proc_set_task_policy2_locked(task_t task, thread_t thread, int category, int flavor, int value1, int value2);
129 static void task_policy_update_locked(task_t task, thread_t thread, task_pend_token_
670 thread_policy_create(thread_t thread) argument
688 task_policy_update_locked(task_t task, thread_t thread, task_pend_token_t pend_token) argument
716 task_policy_update_internal_locked(task_t task, thread_t thread, boolean_t in_create, task_pend_token_t pend_token) argument
1202 task_policy_update_thread_locked(thread_t thread, int update_cpu, boolean_t update_throttle, boolean_t update_sfi, boolean_t update_qos) argument
1307 thread_t thread; local
1341 task_policy_update_complete_unlocked(task_t task, thread_t thread, task_pend_token_t pend_token) argument
1372 proc_set_task_policy(task_t task, thread_t thread, int category, int flavor, int value) argument
1410 thread_t thread; local
1448 proc_set_task_policy2(task_t task, thread_t thread, int category, int flavor, int value1, int value2) argument
1478 proc_set_task_policy_locked(task_t task, thread_t thread, int category, int flavor, int value) argument
1606 proc_set_task_policy2_locked(task_t task, thread_t thread, int category, int flavor, int value1, int value2) argument
1660 proc_get_task_policy(task_t task, thread_t thread, int category, int flavor) argument
1735 proc_get_task_policy2(task_t task, thread_t thread, int category __unused, int flavor, int *value1, int *value2) argument
1787 proc_get_effective_thread_policy(thread_t thread, int flavor) argument
1801 proc_get_effective_policy(task_t task, thread_t thread, int flavor) argument
2016 proc_apply_workq_bgthreadpolicy(thread_t thread) argument
2032 proc_restore_workq_bgthreadpolicy(thread_t thread) argument
2045 proc_setthread_saved_importance(__unused thread_t thread, __unused int importance) argument
2065 set_thread_iotier_override(thread_t thread, int policy) argument
2104 proc_thread_qos_add_override(task_t task, thread_t thread, uint64_t tid, int override_qos, boolean_t first_override_for_resource) argument
2175 proc_thread_qos_remove_override(task_t task, thread_t thread, uint64_t tid) argument
2457 proc_get_thread_policy(thread_t thread, thread_policy_state_t info) argument
2510 trequested_0(task_t task, thread_t thread) argument
2521 trequested_1(task_t task, thread_t thread) argument
2536 teffective_0(task_t task, thread_t thread) argument
2547 teffective_1(task_t task, thread_t thread) argument
2565 task_requested_bitfield(task_t task, thread_t thread) argument
2613 task_effective_bitfield(task_t task, thread_t thread) argument
2901 thread_t thread; local
2933 thread_t thread; local
[all...]
H A Dsched_multiq.c46 #include <kern/thread.h>
64 * When we choose a new thread, we will decide whether to look at the bound runqueue, the global runqueue
65 * or the current group's runqueue, then dequeue the next thread in that runqueue.
77 * NOTE ABOUT thread->sched_pri:
79 * It can change after enqueue - it's changed without pset lock but with thread lock if thread->runq is 0.
111 * was from a thread in the same group or different group,
127 * Perhaps choose_thread could pass in the current thread?
134 * A) Hand off only when switching thread to thread i
517 thread_t thread = (thread_t)(void*)queue_first(queue); local
551 sched_group_check_thread(sched_group_t group, thread_t thread) argument
581 thread_t thread = group_first_thread(group); local
725 thread_t thread; local
757 group_run_queue_enqueue_thread( group_runq_t rq, thread_t thread, integer_t thread_pri, integer_t options) argument
795 group_run_queue_remove_thread( group_runq_t rq, thread_t thread, integer_t thread_pri) argument
836 thread_t thread; local
865 thread_t thread; local
895 thread_t thread; local
910 sched_group_remove_thread( entry_queue_t main_entryq, sched_group_t group, thread_t thread) argument
943 sched_group_enqueue_thread( entry_queue_t main_entryq, sched_group_t group, thread_t thread, integer_t options) argument
1086 sched_multiq_processor_enqueue( processor_t processor, thread_t thread, integer_t options) argument
1106 thread, options); local
1119 sched_multiq_quantum_expire(thread_t thread) argument
1248 thread_t thread; local
1284 sched_multiq_processor_queue_remove( processor_t processor, thread_t thread) argument
1304 run_queue_remove(multiq_bound_runq(processor), thread); local
1309 thread); local
1365 thread_t thread; local
[all...]
H A Dexception.c80 #include <kern/thread.h>
98 thread_t thread,
132 thread_t thread,
150 if (!thread->active)
209 kr = thread_getstatus(thread, flavor,
230 kr = thread_setstatus(thread, flavor,
242 retrieve_thread_self_fast(thread),
243 retrieve_task_self_fast(thread->task),
249 retrieve_thread_self_fast(thread),
250 retrieve_task_self_fast(thread
131 exception_deliver( thread_t thread, exception_type_t exception, mach_exception_data_t code, mach_msg_type_number_t codeCnt, struct exception_action *excp, lck_mtx_t *mutex) argument
360 thread_t thread; local
468 sys_perf_notify(thread_t thread, int pid) argument
[all...]
H A Dmk_sp.c45 #include <kern/thread.h>
57 #include <kern/thread.h>
67 * the given thread. Policy can be any policy implemented by the
72 thread_t thread,
83 if ( thread == THREAD_NULL ||
90 thread_mtx_lock(thread);
163 thread_mtx_unlock(thread);
170 result = thread_set_mode_and_absolute_pri(thread, policy, bas);
173 thread_mtx_unlock(thread);
183 * the given thread
71 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
187 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 Dstack.c39 #include <kern/thread.h>
84 STACK_ZINFO_PALLOC(thread_t thread) argument
89 ledger_credit(thread->t_ledger, task_ledgers.tkm_private, kernel_stack_size);
92 (task = thread->task) != NULL && (zinfo = task->tkm_zinfo) != NULL)
98 STACK_ZINFO_PFREE(thread_t thread) argument
103 ledger_debit(thread->t_ledger, task_ledgers.tkm_private, kernel_stack_size);
106 (task = thread->task) != NULL && (zinfo = task->tkm_zinfo) != NULL)
185 * Allocate a stack for a thread, may
241 thread_t thread)
244 assert(thread
240 stack_alloc( thread_t thread) argument
263 stack_free( thread_t thread) argument
276 stack_free_reserved( thread_t thread) argument
322 stack_alloc_try( thread_t thread) argument
495 stack_privilege( __unused thread_t thread) argument
[all...]
H A Dwait_queue.c105 * Each thread may be waiting for exactly one event; this event
106 * is set using assert_wait(). That thread may be awakened either
108 * or by directly waking that thread up with clear_wait().
116 * Locks on both the thread and on the hash buckets govern the
119 * bucket must be locked before any thread.
123 * thread or hash bucket locks.
1171 * Insert the current thread into the supplied wait queue
1176 * The waiting thread is assumed locked.
1187 thread_t thread)
1192 if (!wait_queue_assert_possible(thread))
1180 wait_queue_assert_wait64_locked( wait_queue_t wq, event64_t event, wait_interrupt_t interruptible, wait_timeout_urgency_t urgency, uint64_t deadline, uint64_t leeway, thread_t thread) argument
1263 thread_t thread = current_thread(); local
1304 thread_t thread = current_thread(); local
1340 thread_t thread = current_thread(); local
1379 thread_t thread = current_thread(); local
1535 thread_t thread = (thread_t)(void *) dequeue(q); local
1768 wait_queue_pull_thread_locked( wait_queue_t waitq, thread_t thread, boolean_t unlock) argument
1800 _wait_queue_select64_thread( wait_queue_t wq, event64_t event, thread_t thread) argument
1876 thread_t thread; local
1913 thread_t thread; local
1951 thread_t thread; local
2002 thread_t thread; local
2048 wait_queue_wakeup64_thread_locked( wait_queue_t wq, event64_t event, thread_t thread, wait_result_t result, boolean_t unlock) argument
2096 wait_queue_wakeup_thread( wait_queue_t wq, event_t event, thread_t thread, wait_result_t result) argument
2144 wait_queue_wakeup64_thread( wait_queue_t wq, event64_t event, thread_t thread, wait_result_t result) argument
[all...]
H A Dlocks.c66 #include <kern/thread.h>
498 thread_t thread = current_thread(); local
509 * during the time that this thread is asleep, so that when it
513 thread->rwlock_count++;
532 if ((thread->rwlock_count-- == 1 /* field now 0 */) && (thread->sched_flags & TH_SFLAG_RW_PROMOTED)) {
534 lck_rw_clear_promotion(thread);
556 thread_t thread = current_thread(); local
568 thread->rwlock_count++;
587 if ((thread
702 thread_t thread = current_thread(); local
762 thread_t thread = current_thread(); local
910 thread_t thread = current_thread(); local
972 thread_t thread = current_thread(); local
1067 lck_rw_clear_promotion(thread_t thread) argument
[all...]
H A Dsfi.h55 * Classifying a thread requires no special locks to be held (although attribute
57 * evaluation will happen at the AST boundary with the thread locked. If possible,
60 sfi_class_id_t sfi_thread_classify(thread_t thread);
62 ast_t sfi_thread_needs_ast(thread_t thread, sfi_class_id_t *out_class /* optional */);
65 void sfi_ast(thread_t thread);
66 void sfi_reevaluate(thread_t thread);
H A Dkern_stackshot.c47 #include <kern/thread.h>
102 extern int machine_trace_thread(thread_t thread, char *tracepos, char *tracebound, int nframes, boolean_t user_p);
103 extern int machine_trace_thread64(thread_t thread, char *tracepos, char *tracebound, int nframes, boolean_t user_p);
209 thread_t thread = THREAD_NULL; local
477 queue_iterate(&task->threads, thread, thread_t, task_threads){
480 if ((thread == NULL) || !ml_validate_nofault((vm_offset_t) thread, sizeof(struct thread)))
487 if (!save_userframes_p && thread->kernel_stack == 0)
490 /* Populate the thread snapsho
[all...]
H A Dsfi.c65 * running a thread that should be SFI-ed are sent an AST.
87 * The wait queue will take the thread's scheduling lock. We may also take
89 * if the thread should block in the wait queue, but the lock will be
348 /* Iterate over processors, call cause_ast_check() on ones running a thread that should be in an off phase */
664 * role of quickly categorizing a thread into its SFI class so that an AST_SFI can be
665 * set. As the thread is unwinding to userspace, sfi_ast() performs full locking
666 * and determines whether the thread should enter an SFI wait state. Because of
668 * thread classification can be inaccurate (but should always be safe). This is
670 * classify the active thread on a remote processor without taking the thread loc
680 sfi_thread_classify(thread_t thread) argument
771 sfi_thread_needs_ast(thread_t thread, sfi_class_id_t *out_class) argument
838 sfi_ast(thread_t thread) argument
924 sfi_reevaluate(thread_t thread) argument
[all...]
/xnu-2782.1.97/iokit/Kernel/
H A DIOLocks.cpp123 thread_t thread; member in struct:_IORecursiveLock
141 lock->thread = 0;
174 if( lock->thread == IOThreadSelf())
178 assert( lock->thread == 0 );
180 lock->thread = IOThreadSelf();
189 if( lock->thread == IOThreadSelf()) {
194 assert( lock->thread == 0 );
196 lock->thread = IOThreadSelf();
208 assert( lock->thread == IOThreadSelf() );
211 lock->thread
[all...]
/xnu-2782.1.97/libsyscall/mach/
H A Dexc_catcher.c45 mach_port_t thread,
61 return (*exc_raise_func)(exception_port, thread, task, exception, code, codeCnt);
64 return catch_exception_raise(exception_port, thread, task, exception, code, codeCnt);
43 internal_catch_exception_raise( mach_port_t exception_port, mach_port_t thread, mach_port_t task, exception_type_t exception, exception_data_t code, mach_msg_type_number_t codeCnt) argument
/xnu-2782.1.97/osfmk/i386/
H A Dfpu.h64 #include <kern/thread.h>
69 #include <i386/thread.h>
104 extern void fpu_save_context(thread_t thread);
H A Dpcb_native.c74 #include <kern/thread.h>
96 #include <i386/thread.h>
211 * Set the thread`s cthread (a.k.a pthread)
223 * Set the thread`s LDT or LDT entry.
246 thread_set_wq_state32(thread_t thread, thread_state_t tstate) argument
253 pal_register_cache_state(thread, DIRTY);
255 saved_state = USER_REGS32(thread);
259 if (curth != thread) {
261 thread_lock(thread);
280 if (curth != thread) {
290 thread_set_wq_state64(thread_t thread, thread_state_t tstate) argument
338 machine_thread_create( thread_t thread, task_t task) argument
412 machine_thread_destroy( thread_t thread) argument
437 machine_thread_set_tsd_base( thread_t thread, mach_vm_offset_t tsd_base) argument
[all...]
H A Dpal_routines.h106 extern void pal_dbg_page_fault( thread_t thread, user_addr_t vadddr,
113 void pal_syscall_restart(thread_t thread, x86_saved_state_t *state);
116 void pal_execve_return(thread_t thread);
119 void pal_thread_terminate_self(thread_t thread);
122 void pal_ast_check(thread_t thread);
138 * Mark in-memory thread register cache state validity.
141 void pal_register_cache_state(thread_t thread, pal_cache_state_t state);
144 /* Catch code running on the except thread that shouldn't be */
H A Dbsd_i386.c42 #include <kern/thread.h>
63 #include <i386/thread.h>
89 * dependent thread state info.
93 __unused thread_t thread,
152 * thread, if otherwise unknown.
156 thread_t thread,
159 if (thread_is_64bit(thread)) {
169 __unused thread_t thread,
561 * dependent thread state info.
565 thread_t thread,
92 thread_userstack( __unused thread_t thread, int flavor, thread_state_t tstate, __unused unsigned int count, mach_vm_offset_t *user_stack, int *customstack ) argument
155 thread_userstackdefault( thread_t thread, mach_vm_offset_t *default_user_stack) argument
168 thread_entrypoint( __unused thread_t thread, int flavor, thread_state_t tstate, __unused unsigned int count, mach_vm_offset_t *entry_point ) argument
564 thread_setuserstack( thread_t thread, mach_vm_address_t user_stack) argument
591 thread_adjuserstack( thread_t thread, int adjust) argument
622 thread_setentrypoint(thread_t thread, mach_vm_address_t entry) argument
642 thread_setsinglestep(thread_t thread, int on) argument
676 find_user_regs(thread_t thread) argument
697 find_kern_regs(thread_t thread) argument
[all...]
/xnu-2782.1.97/osfmk/kperf/
H A Dkperf.c29 #include <kern/thread.h>
45 /* thread on CPUs before starting the PET thread */
180 kperf_get_thread_bits( thread_t thread )
182 return thread->t_chud;
186 kperf_set_thread_bits( thread_t thread, uint32_t bits ) argument
188 thread->t_chud = bits;
191 /* mark an AST to fire on a thread */
193 kperf_set_thread_ast( thread_t thread )
195 /* FIXME: only call this on current thread fro
[all...]
/xnu-2782.1.97/osfmk/mach/
H A Dexc.defs80 thread : mach_port_move_send_t;
84 thread : mach_port_t;
106 thread : mach_port_move_send_t;
110 thread : mach_port_t;
H A Dmach_exc.defs80 thread : mach_port_move_send_t;
84 thread : mach_port_t;
106 thread : mach_port_move_send_t;
110 thread : mach_port_t;
H A Dthread_act.defs81 * Destroy the target thread.
84 * target thread. This will have to change in the future because
97 * list of valid flavors for the target thread.]
105 * Set the selected state information for the target thread.
106 * If the thread is currently executing, the state change
120 * Backward compatible old-style thread routines.
124 * thread. If the thread is currently executing, the results
134 * Set the selected state information for the target thread.
135 * If the thread i
[all...]
/xnu-2782.1.97/bsd/kern/
H A Dspl.c30 #include <kern/thread.h>
/xnu-2782.1.97/osfmk/console/
H A Dserial_general.c38 #include <kern/thread.h>
46 * This routine will start a thread that polls the serial port, listening for
54 thread_t thread; local
60 result = kernel_thread_start_priority((thread_continue_t)serial_keyboard_start, NULL, MAXPRI_KERNEL, &thread);
64 thread_deallocate(thread);
/xnu-2782.1.97/osfmk/chud/i386/
H A Dchud_thread_i386.c32 #include <machine/thread.h>
36 #include <kern/thread.h>
49 #pragma mark **** thread state ****
54 thread_t thread,
62 if (thread->task == kernel_task)
64 /* this properly handles deciding whether or not the thread is 64 bit or not */
65 return machine_thread_get_state(thread, flavor, tstate, count);
72 // the user doesn't care if the thread states are user or kernel, he
73 // just wants the thread state, so we need to determine the proper one
74 // to return, kernel or user, for the given thread
53 chudxnu_thread_get_state( thread_t thread, thread_flavor_t flavor, thread_state_t tstate, mach_msg_type_number_t *count, boolean_t user_only) argument
95 chudxnu_thread_set_state( thread_t thread, thread_flavor_t flavor, thread_state_t tstate, mach_msg_type_number_t count, boolean_t user_only) argument
217 do_backtrace32( task_t task, thread_t thread, x86_saved_state32_t *regs, uint64_t *frames, mach_msg_type_number_t *start_idx, mach_msg_type_number_t max_idx, boolean_t supervisor) argument
296 do_backtrace64( task_t task, thread_t thread, x86_saved_state64_t *regs, uint64_t *frames, mach_msg_type_number_t *start_idx, mach_msg_type_number_t max_idx, boolean_t supervisor) argument
372 do_kernel_backtrace( thread_t thread, struct x86_kernel_state *regs, uint64_t *frames, mach_msg_type_number_t *start_idx, mach_msg_type_number_t max_idx) argument
472 chudxnu_thread_get_callstack64_internal( thread_t thread, uint64_t *callstack, mach_msg_type_number_t *count, boolean_t user_only, boolean_t kern_only) argument
707 chudxnu_thread_get_callstack64_kperf( thread_t thread, uint64_t *callstack, mach_msg_type_number_t *count, boolean_t is_user) argument
717 chudxnu_thread_get_callstack64( thread_t thread, uint64_t *callstack, mach_msg_type_number_t *count, boolean_t user_only) argument
[all...]

Completed in 183 milliseconds

1234567891011