* LTT marker control module over /proc
*/
-//ust// #include <linux/proc_fs.h>
-//ust// #include <linux/module.h>
-//ust// #include <linux/stat.h>
-//ust// #include <linux/vmalloc.h>
-//ust// #include <linux/marker.h>
-//ust// #include <linux/ltt-tracer.h>
-//ust// #include <linux/uaccess.h>
-//ust// #include <linux/string.h>
-//ust// #include <linux/ctype.h>
-//ust// #include <linux/list.h>
-//ust// #include <linux/mutex.h>
-//ust// #include <linux/seq_file.h>
-//ust// #include <linux/slab.h>
#include <ctype.h>
+#include <stdlib.h>
-#include <ust/kernelcompat.h>
-//#include "list.h"
#include "tracer.h"
#include "usterr.h"
int comparison;
struct ltt_available_probe *iter;
- mutex_lock(&probes_mutex);
+ pthread_mutex_lock(&probes_mutex);
list_for_each_entry_reverse(iter, &probes_registered_list, node) {
comparison = strcmp(pdata->name, iter->name);
if (!comparison) {
/* Should be added at the head of the list */
list_add(&pdata->node, &probes_registered_list);
end:
- mutex_unlock(&probes_mutex);
+ pthread_mutex_unlock(&probes_mutex);
return ret;
}
int ret = 0;
struct ltt_active_marker *amark, *tmp;
- mutex_lock(&probes_mutex);
+ pthread_mutex_lock(&probes_mutex);
list_for_each_entry_safe(amark, tmp, &markers_loaded_list, node) {
if (amark->probe == pdata) {
ret = marker_probe_unregister_private_data(
}
list_del(&pdata->node);
end:
- mutex_unlock(&probes_mutex);
+ pthread_mutex_unlock(&probes_mutex);
return ret;
}
struct ltt_available_probe *probe;
ltt_lock_traces();
- mutex_lock(&probes_mutex);
+ pthread_mutex_lock(&probes_mutex);
probe = get_probe_from_name(pname);
if (!probe) {
ret = -ENOENT;
else
list_add(&pdata->node, &markers_loaded_list);
end:
- mutex_unlock(&probes_mutex);
+ pthread_mutex_unlock(&probes_mutex);
ltt_unlock_traces();
return ret;
}
struct ltt_available_probe *probe;
int ret = 0;
- mutex_lock(&probes_mutex);
+ pthread_mutex_lock(&probes_mutex);
probe = get_probe_from_name(pname);
if (!probe) {
ret = -ENOENT;
free(pdata);
}
end:
- mutex_unlock(&probes_mutex);
+ pthread_mutex_unlock(&probes_mutex);
return ret;
}