On Tue, 10 Apr 2007 19:26:20 -0400 Mathieu Desnoyers wrote:
> ------------------------------ CUT -------------------------------------
> /* probe-example.c
> *
> - * Loads a function at a marker call site.
> + * Connects a two functions to marker call sites.
s/a //
> *
> * (C) Copyright 2007 Mathieu Desnoyers <[email protected]>
> *
> @@ -109,67 +113,83 @@ Flag compatibility is checked before connecting the probe to the marker.
>
> #include <linux/sched.h>
> #include <linux/kernel.h>
> +#include <linux/module.h>
> #include <linux/marker.h>
> +#include <asm/atomic.h>
> +
> +#define NUM_PROBES (sizeof(probe_array) / sizeof(struct probe_data))
#define NUM_PROBES ARRAY_SIZE(probe_array)
> -#define SUBSYSTEM_EVENT_FORMAT "%d %s %p[struct task_struct]"
> -void probe_subsystem_event(const char *format, ...)
> +struct probe_data {
> + const char *name;
> + const char *format;
> + marker_probe_func *probe_func;
> +};
> +
>
> +static struct probe_data probe_array[] =
> +{
> + { .name = "subsystem_event",
> + .format = "%d %s",
> + .probe_func = probe_subsystem_event },
> + { .name = "subsystem_eventb",
> + .format = MARK_NOARGS,
> + .probe_func = probe_subsystem_eventb },
> +};
> +
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]