void OSTaskSwHook (void) { #if OS_CPU_FPU_EN > 0 void *pblk; #endif #if OS_CPU_FPU_EN > 0 /* Save VFP context of preempted task */ if (OSRunning == OS_TRUE) { /* Don't save on OSStart()! */ if (OSTCBCur->OSTCBOpt & OS_TASK_OPT_SAVE_FP) { /* See if task used FP */ pblk = OSTCBCur->OSTCBExtPtr; /* Yes, Get pointer to FP storage area */ if (pblk != (void *)0) { /* Make sure we have storage */ OS_CPU_FP_Save(pblk); /* Save the VFP registers in block */ } } } /* Restore VFP context of new task */ if (OSTCBHighRdy->OSTCBOpt & OS_TASK_OPT_SAVE_FP) { /* See if new task uses FP */ pblk = OSTCBHighRdy->OSTCBExtPtr; /* Yes, Get pointer to FP storage area */ if (pblk != (void *)0) { /* Make sure we have storage */ OS_CPU_FP_Restore(pblk); /* Get contents of VFP registers */ } } #endif #if OS_VIEW_MODULE > 0 OSView_TaskSwHook(); #endif }
void OSTaskSwHook (void) { #if OS_VIEW_MODULE > 0 OSView_TaskSwHook(); #endif }
void App_TaskSwHook (void) { #if (OS_VIEW_MODULE == DEF_ENABLED) OSView_TaskSwHook(); #endif }