示例#1
0
文件: fork.c 项目: 19Dan01/linux
void free_task(struct task_struct *tsk)
{
	account_kernel_stack(tsk->stack, -1);
	arch_release_thread_info(tsk->stack);
	free_thread_info(tsk->stack);
	rt_mutex_debug_task_free(tsk);
	ftrace_graph_exit_task(tsk);
	put_seccomp_filter(tsk);
	arch_release_task_struct(tsk);
	free_task_struct(tsk);
}
static void free_thread_info(struct thread_info *ti)
{
	arch_release_thread_info(ti);
	kmem_cache_free(thread_info_cache, ti);
}
static inline void free_thread_info(struct thread_info *ti)
{
	arch_release_thread_info(ti);
	free_pages((unsigned long)ti, THREAD_SIZE_ORDER);
}