From 383ca010e82dc5f00afa79250b3e0f15ed04cfed Mon Sep 17 00:00:00 2001 From: hunt Date: Thu, 23 Jun 2005 08:17:26 +0000 Subject: 2005-06-23 Martin Hunt * transport.h: Move all the transport open stuff here and provide a convenient macro. --- runtime/transport/ChangeLog | 3 +++ runtime/transport/transport.h | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'runtime') diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index f4dff716..783d9c6e 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,5 +1,8 @@ 2005-06-23 Martin Hunt + * transport.h: Move all the transport open stuff here + and provide a convenient macro. + * control.c: Replace macro DEFINE_SPINLOCK because some kernels don't have it. diff --git a/runtime/transport/transport.h b/runtime/transport/transport.h index 9e98c894..1e272717 100644 --- a/runtime/transport/transport.h +++ b/runtime/transport/transport.h @@ -9,6 +9,9 @@ #include "netlink.h" #include "relayfs.h" +static unsigned n_subbufs = 4; +static unsigned subbuf_size = 65536; + /* SystemTap transport values */ enum { @@ -16,6 +19,22 @@ enum STP_TRANSPORT_RELAYFS }; +#ifdef STP_NETLINK_ONLY +static int transport_mode = STP_TRANSPORT_NETLINK; +#else +static int transport_mode = STP_TRANSPORT_RELAYFS; +#endif + +static int pid; +module_param(pid, int, 0); +MODULE_PARM_DESC(pid, "daemon pid"); + +#define TRANSPORT_OPEN \ + if (_stp_transport_open(transport_mode, n_subbufs, subbuf_size, pid) < 0) {\ + printk("init_module: Couldn't open transport\n"); \ + return -1; \ + } + /* transport data structure */ struct stp_transport { -- cgit