aboutsummaryrefslogtreecommitdiff
path: root/lib/dump_stack.c
diff options
context:
space:
mode:
authorMeizu OpenSource <patchwork@meizu.com>2016-08-15 10:19:42 +0800
committerMeizu OpenSource <patchwork@meizu.com>2016-08-15 10:19:42 +0800
commitd2e1446d81725c351dc73a03b397ce043fb18452 (patch)
tree4dbc616b7f92aea39cd697a9084205ddb805e344 /lib/dump_stack.c
first commit
Diffstat (limited to 'lib/dump_stack.c')
-rw-r--r--lib/dump_stack.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/dump_stack.c b/lib/dump_stack.c
new file mode 100644
index 000000000..53bad099e
--- /dev/null
+++ b/lib/dump_stack.c
@@ -0,0 +1,20 @@
+/*
+ * Provide a default dump_stack() function for architectures
+ * which don't implement their own.
+ */
+
+#include <linux/kernel.h>
+#include <linux/export.h>
+#include <linux/sched.h>
+
+/**
+ * dump_stack - dump the current task information and its stack trace
+ *
+ * Architectures can override this implementation by implementing its own.
+ */
+void dump_stack(void)
+{
+ dump_stack_print_info(KERN_DEFAULT);
+ show_stack(NULL, NULL);
+}
+EXPORT_SYMBOL(dump_stack);