X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-tracker-pid.c;h=eeee9d55a5b844106178d5186c37ef61012aa2e3;hb=f934e302d314d76563484f31caed56ad680eb17b;hp=a62ec4e459343ea9ea615f58e78651dd7697a9e9;hpb=7e6f9ef6f2e62dfe359b94562cd98197367ddbac;p=lttng-modules.git diff --git a/lttng-tracker-pid.c b/lttng-tracker-pid.c index a62ec4e4..eeee9d55 100644 --- a/lttng-tracker-pid.c +++ b/lttng-tracker-pid.c @@ -25,11 +25,11 @@ #include #include #include -#include #include #include #include "wrapper/tracepoint.h" +#include "wrapper/list.h" #include "lttng-events.h" /* @@ -59,7 +59,7 @@ bool lttng_pid_tracker_lookup(struct lttng_pid_tracker *lpf, int pid) uint32_t hash = hash_32(pid, 32); head = &lpf->pid_hash[hash & (LTTNG_PID_TABLE_SIZE - 1)]; - hlist_for_each_entry_rcu_notrace(e, head, hlist) { + lttng_hlist_for_each_entry_rcu_notrace(e, head, hlist) { if (pid == e->pid) return 1; /* Found */ } @@ -77,7 +77,7 @@ int lttng_pid_tracker_add(struct lttng_pid_tracker *lpf, int pid) uint32_t hash = hash_32(pid, 32); head = &lpf->pid_hash[hash & (LTTNG_PID_TABLE_SIZE - 1)]; - hlist_for_each_entry(e, head, hlist) { + lttng_hlist_for_each_entry(e, head, hlist) { if (pid == e->pid) return -EEXIST; } @@ -127,7 +127,7 @@ int lttng_pid_tracker_del(struct lttng_pid_tracker *lpf, int pid) * No need of _safe iteration, because we stop traversal as soon * as we remove the entry. */ - hlist_for_each_entry(e, head, hlist) { + lttng_hlist_for_each_entry(e, head, hlist) { if (pid == e->pid) { pid_tracker_del_node_rcu(e); return 0; @@ -150,7 +150,7 @@ void lttng_pid_tracker_destroy(struct lttng_pid_tracker *lpf) struct lttng_pid_hash_node *e; struct hlist_node *tmp; - hlist_for_each_entry_safe(e, tmp, head, hlist) + lttng_hlist_for_each_entry_safe(e, tmp, head, hlist) pid_tracker_del_node(e); } kfree(lpf);