| * Provide a default dump_stack() function for architectures |
| * which don't implement their own. |
| #include <linux/kernel.h> |
| #include <linux/export.h> |
| #include <linux/atomic.h> |
| static void __dump_stack(void) |
| dump_stack_print_info(KERN_DEFAULT); |
| * dump_stack - dump the current task information and its stack trace |
| * Architectures can override this implementation by implementing its own. |
| static atomic_t dump_lock = ATOMIC_INIT(-1); |
| asmlinkage __visible void dump_stack(void) |
| * Permit this cpu to perform nested stack dumps while serialising |
| cpu = smp_processor_id(); |
| old = atomic_cmpxchg(&dump_lock, -1, cpu); |
| atomic_set(&dump_lock, -1); |
| asmlinkage __visible void dump_stack(void) |
| EXPORT_SYMBOL(dump_stack); |