mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-09-10 17:32:46 -04:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
32
tools/lib/lockdep/uinclude/linux/stacktrace.h
Normal file
32
tools/lib/lockdep/uinclude/linux/stacktrace.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#ifndef _LIBLOCKDEP_LINUX_STACKTRACE_H_
|
||||
#define _LIBLOCKDEP_LINUX_STACKTRACE_H_
|
||||
|
||||
#include <execinfo.h>
|
||||
|
||||
struct stack_trace {
|
||||
unsigned int nr_entries, max_entries;
|
||||
unsigned long *entries;
|
||||
int skip;
|
||||
};
|
||||
|
||||
static inline void print_stack_trace(struct stack_trace *trace, int spaces)
|
||||
{
|
||||
backtrace_symbols_fd((void **)trace->entries, trace->nr_entries, 1);
|
||||
}
|
||||
|
||||
#define save_stack_trace(trace) \
|
||||
((trace)->nr_entries = \
|
||||
backtrace((void **)(trace)->entries, (trace)->max_entries))
|
||||
|
||||
static inline int dump_stack(void)
|
||||
{
|
||||
void *array[64];
|
||||
size_t size;
|
||||
|
||||
size = backtrace(array, 64);
|
||||
backtrace_symbols_fd(array, size, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue