1 /* 2 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 */ 8 9 #include <linux/ptrace.h> 10 #include <linux/export.h> 11 12 /*------------------------------------------------------------------------- 13 * APIs expected by various kernel sub-systems 14 *------------------------------------------------------------------------- 15 */ 16 17 noinline void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs) 18 { 19 pr_info("\nStack Trace: NOT Available\n"); 20 } 21 EXPORT_SYMBOL(show_stacktrace); 22 23 /* Expected by sched Code */ 24 void show_stack(struct task_struct *tsk, unsigned long *sp) 25 { 26 show_stacktrace(tsk, NULL); 27 } 28 29 /* Expected by Rest of kernel code */ 30 void dump_stack(void) 31 { 32 show_stacktrace(NULL, NULL); 33 } 34 EXPORT_SYMBOL(dump_stack); 35 36 /* Another API expected by schedular, shows up in "ps" as Wait Channel 37 * Ofcourse just returning schedule( ) would be pointless so unwind until 38 * the function is not in schedular code 39 */ 40 unsigned int get_wchan(struct task_struct *tsk) 41 { 42 return 0; 43 } 44