mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-09-10 09:22:44 -04:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
33
tools/lib/lockdep/common.c
Normal file
33
tools/lib/lockdep/common.c
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/lockdep.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
static __thread struct task_struct current_obj;
|
||||
|
||||
/* lockdep wants these */
|
||||
bool debug_locks = true;
|
||||
bool debug_locks_silent;
|
||||
|
||||
__attribute__((constructor)) static void liblockdep_init(void)
|
||||
{
|
||||
lockdep_init();
|
||||
}
|
||||
|
||||
__attribute__((destructor)) static void liblockdep_exit(void)
|
||||
{
|
||||
debug_check_no_locks_held(¤t_obj);
|
||||
}
|
||||
|
||||
struct task_struct *__curr(void)
|
||||
{
|
||||
if (current_obj.pid == 0) {
|
||||
/* Makes lockdep output pretty */
|
||||
prctl(PR_GET_NAME, current_obj.comm);
|
||||
current_obj.pid = syscall(__NR_gettid);
|
||||
}
|
||||
|
||||
return ¤t_obj;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue