Version 2.9.15
[lttng-modules.git] / lttng-tracepoint.c
index 13f9c247d440ca3dc7d69e44a995ec8b90f99370..f2909aced270216e80b5e970d5ed476fb7964df1 100644 (file)
@@ -20,7 +20,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <linux/list.h>
 #include <linux/mutex.h>
 #include <linux/err.h>
 #include <linux/notifier.h>
@@ -29,7 +28,9 @@
 #include <linux/jhash.h>
 #include <linux/module.h>
 
-#include "lttng-tracepoint.h"
+#include <lttng-tracepoint.h>
+#include <wrapper/list.h>
+#include <wrapper/tracepoint.h>
 
 /*
  * Protect the tracepoint table. lttng_tracepoint_mutex nests within
@@ -119,7 +120,7 @@ struct tracepoint_entry *get_tracepoint(const char *name)
        u32 hash = jhash(name, strlen(name), 0);
 
        head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)];
-       hlist_for_each_entry(e, head, hlist) {
+       lttng_hlist_for_each_entry(e, head, hlist) {
                if (!strcmp(name, e->name))
                        return e;
        }
@@ -139,7 +140,7 @@ struct tracepoint_entry *add_tracepoint(const char *name)
        u32 hash = jhash(name, name_len - 1, 0);
 
        head = &tracepoint_table[hash & (TRACEPOINT_TABLE_SIZE - 1)];
-       hlist_for_each_entry(e, head, hlist) {
+       lttng_hlist_for_each_entry(e, head, hlist) {
                if (!strcmp(name, e->name)) {
                        printk(KERN_NOTICE
                                "tracepoint %s busy\n", name);
@@ -241,7 +242,7 @@ int lttng_tracepoint_coming(struct tp_module *tp_mod)
                struct tracepoint_entry *e;
                struct lttng_tp_probe *p;
 
-               tp = tp_mod->mod->tracepoints_ptrs[i];
+               tp = lttng_tracepoint_ptr_deref(&tp_mod->mod->tracepoints_ptrs[i]);
                e = get_tracepoint(tp->name);
                if (!e) {
                        e = add_tracepoint(tp->name);
@@ -268,7 +269,7 @@ int lttng_tracepoint_coming(struct tp_module *tp_mod)
                }
        }
        mutex_unlock(&lttng_tracepoint_mutex);
-       return 0;
+       return NOTIFY_OK;
 }
 
 static
@@ -282,7 +283,7 @@ int lttng_tracepoint_going(struct tp_module *tp_mod)
                struct tracepoint_entry *e;
                struct lttng_tp_probe *p;
 
-               tp = tp_mod->mod->tracepoints_ptrs[i];
+               tp = lttng_tracepoint_ptr_deref(&tp_mod->mod->tracepoints_ptrs[i]);
                e = get_tracepoint(tp->name);
                if (!e || !e->tp)
                        continue;
This page took 0.034639 seconds and 4 git commands to generate.