- * machine_switch_act
- *
- * Machine-dependent details of activation switching. Called with
- * RPC locks held and preemption disabled.
- */
-void
-machine_switch_act(
- thread_t thread,
- thread_act_t old,
- thread_act_t new,
- int cpu)
-{
- pmap_t new_pmap;
- facility_context *fowner;
-
- /* Our context might wake up on another processor, so we must
- * not keep hot state in our FPU, it must go back to the pcb
- * so that it can be found by the other if needed
- */
- if(real_ncpus > 1) { /* This is potentially slow, so only do when actually SMP */
- fowner = per_proc_info[cpu_number()].FPU_owner; /* Cache this because it may change */
- if(fowner) { /* Is there any live context? */
- if(fowner->facAct == old) { /* Is it for us? */
- fpu_save(fowner); /* Yes, save it */
- }
- }
- fowner = per_proc_info[cpu_number()].VMX_owner; /* Cache this because it may change */
- if(fowner) { /* Is there any live context? */
- if(fowner->facAct == old) { /* Is it for us? */
- vec_save(fowner); /* Yes, save it */
- }
- }
- }
-
- active_stacks[cpu] = thread->kernel_stack;
-
- ast_context(new, cpu);
-
- /* Activations might have different pmaps
- * (process->kernel->server, for example).
- * Change space if needed
- */
-
- if(new->mact.specFlags & runningVM) { /* Is the new guy running a VM? */
- pmap_switch(new->mact.vmmCEntry->vmmPmap); /* Switch to the VM's pmap */
- }
- else { /* otherwise, we use the task's pmap */
- new_pmap = new->task->map->pmap;
- if ((old->task->map->pmap != new_pmap) || (old->mact.specFlags & runningVM)) {
- pmap_switch(new_pmap);
- }
- }
-
-}
-
-void
-pcb_user_to_kernel(thread_act_t act)
-{
-
- return; /* Not needed, I hope... */
-}
-
-
-/*
- * act_machine_sv_free
- * release saveareas associated with an act. if flag is true, release
- * user level savearea(s) too, else don't
- *
- * this code cannot block so we call the proper save area free routine