Impact: cleanup
Eliminate #ifdefs in core code by using empty inline functions.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
extern void ftrace_retfunc_init_task(struct task_struct *t);
extern void ftrace_retfunc_exit_task(struct task_struct *t);
+#else
+static inline void ftrace_retfunc_init_task(struct task_struct *t) { }
+static inline void ftrace_retfunc_exit_task(struct task_struct *t) { }
#endif
#endif /* _LINUX_FTRACE_H */
preempt_disable();
/* causes final put_task_struct in finish_task_switch(). */
tsk->state = TASK_DEAD;
-#ifdef CONFIG_FUNCTION_RET_TRACER
ftrace_retfunc_exit_task(tsk);
-#endif
schedule();
BUG();
/* Avoid "noreturn function does return". */
total_forks++;
spin_unlock(¤t->sighand->siglock);
write_unlock_irq(&tasklist_lock);
-#ifdef CONFIG_FUNCTION_RET_TRACER
ftrace_retfunc_init_task(p);
-#endif
proc_fork_connector(p);
cgroup_post_fork(p);
return p;
* The idle tasks have their own, simple scheduling class:
*/
idle->sched_class = &idle_sched_class;
-#ifdef CONFIG_FUNCTION_RET_TRACER
ftrace_retfunc_init_task(idle);
-#endif
}
/*