* 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 "kernelcompat.h"
-//#include "list.h"
+#include <ctype.h>
+#include <stdlib.h>
+
+#include <ust/kernelcompat.h>
#include "tracer.h"
-#include "localerr.h"
+#include "usterr.h"
#define DEFAULT_CHANNEL "cpu"
#define DEFAULT_PROBE "default"
return NULL;
}
+/* (unused)
static char *skip_spaces(char *buf)
{
while (*buf != '\0' && isspace(*buf))
*end = skip_nonspaces(*start);
**end = '\0';
}
+*/
int ltt_probe_register(struct ltt_available_probe *pdata)
{
mutex_unlock(&probes_mutex);
return ret;
}
-EXPORT_SYMBOL_GPL(ltt_probe_register);
/*
* Called when a probe does not want to be called anymore.
mutex_unlock(&probes_mutex);
return ret;
}
-EXPORT_SYMBOL_GPL(ltt_probe_unregister);
/*
* Connect marker "mname" to probe "pname".
ltt_unlock_traces();
return ret;
}
-EXPORT_SYMBOL_GPL(ltt_marker_connect);
/*
* Disconnect marker "mname", probe "pname".
mutex_unlock(&probes_mutex);
return ret;
}
-EXPORT_SYMBOL_GPL(ltt_marker_disconnect);
/*
* function handling proc entry write.
}
//ust// module_init(marker_control_init);
-static void __exit marker_control_exit(void)
+static void __attribute__((destructor)) marker_control_exit(void)
{
int ret;