summaryrefslogtreecommitdiff
path: root/tools/lib/lockdep/common.c
blob: d1c89cc06f5f6710471c42dc5b2a475a54ee7658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#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__((destructor)) static void liblockdep_exit(void)
{
	debug_check_no_locks_held();
}

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 &current_obj;
}
token.c?h=nds-private-remove&id=4f23f206ddce85a92b1acdebe0f4e9ed01b1d3f4'>plain -rw-r--r--gss_krb5_crypto.c27467logplain -rw-r--r--gss_krb5_keys.c9076logplain -rw-r--r--gss_krb5_mech.c20724logplain -rw-r--r--gss_krb5_seal.c6772logplain -rw-r--r--gss_krb5_seqnum.c4645logplain -rw-r--r--gss_krb5_unseal.c6813logplain -rw-r--r--gss_krb5_wrap.c18005logplain -rw-r--r--gss_mech_switch.c12603logplain -rw-r--r--gss_rpc_upcall.c9707logplain