9 #include <linux/sched.h>
14 static long ocd_count;
33 pr_debug(
"ocd_enable: child=%s [%u]\n",
38 if (!child || !test_and_set_tsk_thread_flag(child,
TIF_DEBUG)) {
44 spin_unlock(&ocd_lock);
64 pr_debug(
"ocd_disable (no child)\n");
65 else if (test_tsk_thread_flag(child,
TIF_DEBUG))
66 pr_debug(
"ocd_disable: child=%s [%u]\n",
69 if (!child || test_and_clear_tsk_thread_flag(child,
TIF_DEBUG)) {
80 spin_unlock(&ocd_lock);
84 #ifdef CONFIG_DEBUG_FS
86 #include <linux/module.h>
88 static struct dentry *ocd_debugfs_root;
89 static struct dentry *ocd_debugfs_DC;
90 static struct dentry *ocd_debugfs_DS;
91 static struct dentry *ocd_debugfs_count;
112 static int ocd_count_get(
void *
data,
u64 *
val)
119 static void ocd_debugfs_init(
void)
124 if (IS_ERR(root) || !root)
126 ocd_debugfs_root = root;
129 root,
NULL, &fops_DC);
140 if (!ocd_debugfs_count)
155 static inline void ocd_debugfs_init(
void)
161 static int __init ocd_init(
void)