From fbbb89fffb3533a3b4fb63c15eaeaae6956391eb Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 14 Mar 2007 16:12:40 +0000 Subject: 2007-03-14 Martin Hunt * transport_msgs.h: ifdef old messages as such. Add support for new transport. * relayfs.c: Simplify and add new interface to look like utt. * utt.[ch]: New files. Similar to the proposed utt interface. These setup and teardown relayfs on debugfs. * control.c: New file. Implements a simple control channel. A small subset of procfs.c. * procfs.c: This is now only used for old kernels lacking newer relayfs. Change STP_RELAYFS to STP_BULKMODE. Use new messages from transport_msgs.h. Don't support RELAYFS_CHANNEL_VERSION >= 4. CHanges all control channel functions to new names. Use pids instead of module names in /proc names. --- runtime/transport/utt.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 runtime/transport/utt.h (limited to 'runtime/transport/utt.h') diff --git a/runtime/transport/utt.h b/runtime/transport/utt.h new file mode 100644 index 00000000..f6eba64b --- /dev/null +++ b/runtime/transport/utt.h @@ -0,0 +1,42 @@ +#ifndef UTT_H +#define UTT_H + +enum { + Utt_trace_setup = 1, + Utt_trace_running, + Utt_trace_stopped, +}; + +struct utt_trace { + int trace_state; + struct rchan *rchan; + unsigned long *sequence; + struct dentry *dropped_file; + atomic_t dropped; + struct dentry *utt_tree_root; + void *private_data; +}; + +#define UTT_TRACE_ROOT_NAME_SIZE 32 /* Largest string for a root dir identifier */ +#define UTT_TRACE_NAME_SIZE 32 /* Largest string for a trace identifier */ + +/* + * User setup structure + */ +struct utt_trace_setup { + char root[UTT_TRACE_ROOT_NAME_SIZE]; /* input */ + char name[UTT_TRACE_NAME_SIZE]; /* input */ + u32 buf_size; /* input */ + u32 buf_nr; /* input */ + int is_global; /* input */ + int err; /* output */ +}; + + +extern struct utt_trace *utt_trace_setup(struct utt_trace_setup *utts); +extern int utt_trace_startstop(struct utt_trace *utt, int start, + unsigned int *trace_seq); +extern void utt_trace_cleanup(struct utt_trace *utt); +extern int utt_trace_remove(struct utt_trace *utt); + +#endif -- cgit