#include <linux/debugfs.h>
#include <linux/kernel.h>
#include <linux/tracefs.h>
#include "trace_dynevent.h"
static DEFINE_MUTEX(dyn_event_ops_mutex);
static LIST_HEAD(dyn_event_ops_list);
int dyn_event_register(struct dyn_event_operations *ops)
if (!ops || !ops->create || !ops->show || !ops->is_busy ||
!ops->free || !ops->match)
INIT_LIST_HEAD(&ops->list);
mutex_lock(&dyn_event_ops_mutex);
list_add_tail(&ops->list, &dyn_event_ops_list);
mutex_unlock(&dyn_event_ops_mutex);
int dyn_event_release(int argc, char **argv, struct dyn_event_operations *type)
struct dyn_event *pos, *n;
char *system = NULL, *event, *p;
event = strchr(argv[0], ':');
mutex_lock(&event_mutex);
for_each_dyn_event_safe(pos, n) {
if (type && type != pos->ops)