kernels/linux-2.4.0/arch/ia64/kernel/process.c
/*
 * Clean up state associated with current thread.  This is called when
 * the thread calls exit().
 */
Clean up state associated with current thread.  This is called when
the thread calls exit().
Clean up state associated with current thread . This is called when the thread calls exit () .
void
exit_thread (void)
{
#ifndef CONFIG_SMP
	if (ia64_get_fpu_owner() == current)
		ia64_set_fpu_owner(0);
#endif
#ifdef CONFIG_PERFMON
	if ((current->thread.flags & IA64_THREAD_PM_VALID) != 0) {
		ia64_save_pm_regs(current);
		current->thread.flags &= ~IA64_THREAD_PM_VALID;
	}
#endif
}
void exit_thread ( void ) { #ifndef CONFIG_SMP if ( ia64_get_fpu_owner ( ) == current ) ia64_set_fpu_owner ( 0 ) ; #endif #ifdef CONFIG_PERFMON if ( ( current -> thread . flags & IA64_THREAD_PM_VALID ) != 0 ) { ia64_save_pm_regs ( current ) ; current -> thread . flags &= ~ IA64_THREAD_PM_VALID ; } #endif }
Clean up state associated with current thread.
Clean up state associated with current thread .
/* stop monitoring */ /*
		 * we cannot rely on switch_to() to save the PMU
		 * context for the last time. There is a possible race
		 * condition in SMP mode between the child and the
		 * parent.  by explicitly saving the PMU context here
		 * we garantee no race.  this call we also stop
		 * monitoring
		 */ /*
		 * make sure that switch_to() will not save context again
		 */