This source file includes following definitions.
- liblockdep_exit
- __curr
1
2 #include <stddef.h>
3 #include <stdbool.h>
4 #include <linux/compiler.h>
5 #include <linux/lockdep.h>
6 #include <unistd.h>
7 #include <sys/syscall.h>
8
9 static __thread struct task_struct current_obj;
10
11
12 bool debug_locks = true;
13 bool debug_locks_silent;
14
15 __attribute__((destructor)) static void liblockdep_exit(void)
16 {
17 debug_check_no_locks_held();
18 }
19
20 struct task_struct *__curr(void)
21 {
22 if (current_obj.pid == 0) {
23
24 prctl(PR_GET_NAME, current_obj.comm);
25 current_obj.pid = syscall(__NR_gettid);
26 }
27
28 return ¤t_obj;
29 }