• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/osfmk/ppc/

Lines Matching defs:thread

33 #include <kern/thread.h>
42 #include <ppc/thread.h>
79 void thread_set_cthreadself(thread_t thread, uint64_t pself, int isLP64);
98 * Get the status of the specified thread.
103 thread_t thread,
123 genuser = find_user_regs(thread);
277 if(task_has_64BitAddr(thread->task))
337 fpu_save(thread->machine.curctx); /* Just in case it's live, save it */
341 fsv = find_user_fpu(thread); /* Get the user's fpu savearea */
368 vec_save(thread->machine.curctx); /* Just in case it's live, save it */
372 vsv = find_user_vec(thread); /* Find the vector savearea */
429 thread_t thread,
444 genkern = find_kern_regs(thread);
659 * Set the status of the specified thread.
663 thread_t thread,
735 genuser = get_user_regs(thread); /* Find or allocate and initialize one */
789 if(task_has_64BitAddr(thread->task))
847 if(task_has_64BitAddr(thread->task))
881 toss_live_fpu(thread->machine.curctx); /* Toss my floating point if live anywhere */
883 fsv = find_user_fpu(thread); /* Get the user's floating point context */
888 fsv->save_hdr.save_act = thread;
892 if(!thread->machine.curctx->FPUsave) thread->machine.curctx->FPUsave = fsv; /* If no floating point, chain us first */
895 fsvn = fsvo = thread->machine.curctx->FPUsave; /* Remember first one */
919 toss_live_vec(thread->machine.curctx); /* Toss my vector if live anywhere */
921 vsv = find_user_vec(thread); /* Get the user's vector context */
926 vsv->save_hdr.save_act = thread;
930 if(!thread->machine.curctx->VMXsave) thread->machine.curctx->VMXsave = vsv; /* If no vector, chain us first */
933 vsvn = vsvo = thread->machine.curctx->VMXsave; /* Remember first one */
963 thread_set_wq_state64(thread_t thread, thread_state_t tstate)
969 genuser = get_user_regs(thread); /* Find or allocate and initialize one */
972 if (curth != thread)
973 thread_lock(thread);
986 if (task_has_64BitAddr(thread->task))
989 if (curth != thread)
990 thread_unlock(thread);
1003 thread_t thread)
1007 sv = get_user_regs(thread); /* Find or allocate and initialize one */
1021 * Duplicates the context of one thread into a new one.
1022 * The new thread is assumed to be new and have no user state contexts except maybe a general one.
1023 * We also assume that the old thread can't be running anywhere.
1101 thread_t thread)
1106 if (thread->machine.upcb)
1107 return thread->machine.upcb;
1109 sv = thread->machine.pcb; /* Get the top savearea on the stack */
1119 sv->save_hdr.save_act = thread;
1127 thread->machine.pcb = sv; /* Put it there */
1129 thread->machine.upcb = sv; /* Set user pcb */
1141 if(task_has_64BitAddr(thread->task))
1162 thread_t thread)
1164 return thread->machine.upcb;
1172 thread_t thread)
1174 return thread->machine.pcb;
1184 thread_t thread)
1190 fsv = thread->machine.curctx->FPUsave; /* Get the start of the floating point chain */
1208 thread_t thread)
1214 vsv = thread->machine.curctx->VMXsave; /* Get the start of the vector chain */
1225 * Find the user state vector context for the current thread. If there is no user state context,
1232 thread_t thread = current_thread();
1235 vec_save(thread->machine.curctx); /* Force save if live */
1238 vsv = thread->machine.curctx->VMXsave; /* Get the start of the vector chain */
1253 * dependent thread state info.
1257 __unused thread_t thread,
1330 * dependent thread state info.
1333 thread_setuserstack(thread_t thread, mach_vm_address_t user_stack)
1337 sv = get_user_regs(thread); /* Get the user state registers */
1345 thread_set_cthreadself(thread_t thread, uint64_t pself, int isLP64)
1350 thread->machine.cthread_self = pself;
1352 sv = get_user_regs(thread); /* Get the user state registers */
1354 thread->machine.cthread_self = pself;
1364 * dependent thread state info. Usef for small (<2G) deltas.
1367 thread_adjuserstack(thread_t thread, int adjust)
1371 sv = get_user_regs(thread); /* Get the user state registers */
1380 thread_setsinglestep(thread_t thread, int on)
1384 sv = get_user_regs(thread); /* Get the user state registers */
1398 * dependent thread state info.
1402 thread_setentrypoint(thread_t thread, uint64_t entry)
1406 sv = get_user_regs(thread); /* Get the user state registers */
1413 __unused thread_t thread,
1550 thread_t thread;
1552 thread = current_thread();
1554 fpu_save(thread->machine.curctx); /* Make certain floating point state is all saved */
1555 vec_save(thread->machine.curctx); /* Make certain the vector state is all saved */
1557 osv = find_user_regs(thread); /* Get our savearea */
1560 panic("act_thread_csave: attempting to preserve the context of an activation with none (%p)\n", thread);
1565 sv->save_hdr.save_act = thread;
1580 ofsv = find_user_fpu(thread); /* Get any user floating point */
1587 fsv->save_hdr.save_act = thread;
1600 ovsv = find_user_vec(thread); /* Get any user vector */
1607 vsv->save_hdr.save_act = thread;
1642 thread_t thread;
1661 thread = current_thread();
1663 act_machine_sv_free(thread, 0); /* Blow away any current kernel FP or vector.
1665 toss_live_fpu(thread->machine.curctx); /* Toss my floating point if live anywhere */
1666 toss_live_vec(thread->machine.curctx); /* Toss my vector if live anywhere */
1670 sv->save_hdr.save_act = thread;
1672 spc = (unsigned int)thread->map->pmap->space; /* Get the space we're in */
1674 osv = thread->machine.pcb; /* Get the top general savearea */
1684 else thread->machine.pcb = NULL; /* to the start if the only one */
1691 else thread->machine.pcb = (pcb_t)sv; /* to the start if the only one */
1692 thread->machine.upcb = (pcb_t)sv; /* Set the user pcb */
1694 ovsv = thread->machine.curctx->VMXsave; /* Get the top vector savearea */
1705 else thread->machine.curctx->VMXsave = NULL; /* to the start if the only one */
1713 thread->machine.curctx->VMXsave = vsv; /* to the start if the only one */
1714 thread->machine.curctx->VMXlevel = NULL; /* Insure that we don't have a leftover level */
1719 vsv->save_hdr.save_act = thread;
1722 ofsv = thread->machine.curctx->FPUsave; /* Get the top float savearea */
1733 else thread->machine.curctx->FPUsave = NULL; /* to the start if the only one */
1741 thread->machine.curctx->FPUsave = fsv; /* to the start if the only one */
1742 thread->machine.curctx->FPUlevel = NULL; /* Insure that we don't have a leftover level */
1747 fsv->save_hdr.save_act = thread;
1801 * enables or disables floating point exceptions for the thread.
1805 thread_t thread,
1811 sv = find_user_regs(thread); /* Find the user registers */
1812 if(!sv) sv = get_user_regs(thread); /* Didn't find any, allocate and initialize one */