Lines Matching refs:thread
74 #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)
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) {
281 thread_unlock(thread);
290 thread_set_wq_state64(thread_t thread, thread_state_t tstate)
297 saved_state = USER_REGS64(thread);
306 pal_register_cache_state(thread, DIRTY);
308 if (curth != thread) {
310 thread_lock(thread);
326 if (curth != thread) {
327 thread_unlock(thread);
335 * Initialize the machine-dependent state for a new thread.
339 thread_t thread,
342 pcb_t pcb = THREAD_TO_PCB(thread);
345 inval_copy_windows(thread);
347 thread->machine.physwindow_pte = 0;
348 thread->machine.physwindow_busy = 0;
409 * Machine-dependent cleanup prior to destroying a thread
413 thread_t thread)
415 register pcb_t pcb = THREAD_TO_PCB(thread);
418 if (thread->hv_thread_target) {
419 hv_callbacks.thread_destroy(thread->hv_thread_target);
420 thread->hv_thread_target = NULL;
438 thread_t thread,
442 if (thread->task == kernel_task) {
446 if (thread_is_64bit(thread)) {
455 pcb_t pcb = THREAD_TO_PCB(thread);
458 if (!thread_is_64bit(thread)) {
474 /* For current thread, make the TSD base active immediately */
475 if (thread == current_thread()) {
477 if (thread_is_64bit(thread)) {