2 * Copyright (C) 2008 Mathieu Desnoyers
4 * Dual LGPL v2.1/GPL v2 license.
7 #include <linux/module.h>
8 #include <linux/debugfs.h>
10 #include <linux/mutex.h>
12 #include "ltt-tracer.h"
14 #define LTT_FILTER_DIR "filter"
17 * Protects the ltt_filter_dir allocation.
19 static DEFINE_MUTEX(ltt_filter_mutex
);
21 static struct dentry
*ltt_filter_dir
;
23 struct dentry
*get_filter_root(void)
25 struct dentry
*ltt_root_dentry
;
27 mutex_lock(<t_filter_mutex
);
28 if (!ltt_filter_dir
) {
29 ltt_root_dentry
= get_ltt_root();
33 ltt_filter_dir
= debugfs_create_dir(LTT_FILTER_DIR
,
37 "ltt_filter_init: failed to create dir %s\n",
41 mutex_unlock(<t_filter_mutex
);
42 return ltt_filter_dir
;
44 EXPORT_SYMBOL_GPL(get_filter_root
);
46 static void __exit
ltt_filter_exit(void)
48 debugfs_remove(ltt_filter_dir
);
51 module_exit(ltt_filter_exit
);
53 MODULE_LICENSE("GPL and additional rights");
54 MODULE_AUTHOR("Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>");
55 MODULE_DESCRIPTION("Linux Trace Toolkit Filter");
This page took 0.030615 seconds and 4 git commands to generate.