-
- register savearea *pcb, *ppsv;
- register savearea_vec *vsv, *vpsv;
- register savearea_fpu *fsv, *fpsv;
- register savearea *svp;
- register int i;
-
-/*
- * This function will release all context.
- */
-
- act_virtual_machine_destroy(act); /* Make sure all virtual machines are dead first */
-
-/*
- *
- * Walk through and release all floating point and vector contexts. Also kill live context.
- *
- */
-
- toss_live_vec(act->mact.curctx); /* Dump live vectors */
-
- vsv = act->mact.curctx->VMXsave; /* Get the top vector savearea */
-
- while(vsv) { /* Any VMX saved state? */
- vpsv = vsv; /* Remember so we can toss this */
- vsv = (savearea_vec *)vsv->save_hdr.save_prev; /* Get one underneath our's */
- save_release((savearea *)vpsv); /* Release it */
- }
-
- act->mact.curctx->VMXsave = 0; /* Kill chain */
-
- toss_live_fpu(act->mact.curctx); /* Dump live float */
-
- fsv = act->mact.curctx->FPUsave; /* Get the top float savearea */
-
- while(fsv) { /* Any float saved state? */
- fpsv = fsv; /* Remember so we can toss this */
- fsv = (savearea_fpu *)fsv->save_hdr.save_prev; /* Get one underneath our's */
- save_release((savearea *)fpsv); /* Release it */
- }
-
- act->mact.curctx->FPUsave = 0; /* Kill chain */
-
-/*
- * free all regular saveareas.
- */
-
- pcb = act->mact.pcb; /* Get the general savearea */
-
- while(pcb) { /* Any float saved state? */
- ppsv = pcb; /* Remember so we can toss this */
- pcb = pcb->save_hdr.save_prev; /* Get one underneath our's */
- save_release(ppsv); /* Release it */
- }
-
- hw_atomic_sub(&saveanchor.savetarget, 4); /* Unaccount for the number of saveareas we think we "need" */
-
-}
-
-
-kern_return_t
-act_machine_create(task_t task, thread_act_t thr_act)
-{
- /*
- * Clear & Init the pcb (sets up user-mode s regs)
- * We don't use this anymore.
- */
-
- return KERN_SUCCESS;
-}
-
-void act_machine_init()
-{
-
- /* Good to verify these once */
- assert( THREAD_MACHINE_STATE_MAX <= THREAD_STATE_MAX );
-
- assert( THREAD_STATE_MAX >= PPC_THREAD_STATE_COUNT );
- assert( THREAD_STATE_MAX >= PPC_EXCEPTION_STATE_COUNT );
- assert( THREAD_STATE_MAX >= PPC_FLOAT_STATE_COUNT );
-
- /*
- * If we start using kernel activations,
- * would normally create kernel_thread_pool here,
- * populating it from the act_zone
- */