diff options
Diffstat (limited to 'runtime/transport')
-rw-r--r-- | runtime/transport/ChangeLog | 9 | ||||
-rw-r--r-- | runtime/transport/procfs.c | 4 | ||||
-rw-r--r-- | runtime/transport/relayfs-config.h.in | 2 | ||||
-rw-r--r-- | runtime/transport/relayfs.c | 12 | ||||
-rw-r--r-- | runtime/transport/relayfs.h | 2 | ||||
-rw-r--r-- | runtime/transport/transport.c | 4 |
6 files changed, 19 insertions, 14 deletions
diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index 36667ecc..e6ab7fe2 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,3 +1,12 @@ +2006-03-16 Tom Zanussi <zanussi@us.ibm.com> + + * procfs.c (_stp_proc_read): Change ifdef for relayfs version. + * relayfs.c: Change ifdefs for relayfs version. + * relayfs.h: Remove relayfs-config.h include. + * transport.c (_stp_handle_buf_info.c): Change ifdef for relayfs + version. + * relayfs-config.h.in: Removed. + 2006-03-15 Tom Zanussi <zanussi@us.ibm.com> * procfs.c (_stp_proc_read): Add ifdef for CONFIG_RELAY. diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c index 22b14046..ec463c4c 100644 --- a/runtime/transport/procfs.c +++ b/runtime/transport/procfs.c @@ -31,13 +31,13 @@ _stp_proc_read (struct file *file, char __user *buf, size_t count, loff_t *ppos) return -EINVAL; out.cpu = cpu; -#if RELAYFS_VERSION_GE_4 || defined (CONFIG_RELAY) +#if (RELAYFS_CHANNEL_VERSION >= 4) || defined (CONFIG_RELAY) out.produced = _stp_chan->buf[cpu]->subbufs_produced; out.consumed = _stp_chan->buf[cpu]->subbufs_consumed; #else out.produced = atomic_read(&_stp_chan->buf[cpu]->subbufs_produced); out.consumed = atomic_read(&_stp_chan->buf[cpu]->subbufs_consumed); -#endif /* RELAYFS_VERSION_GE_4 || CONFIG_RELAY */ +#endif /* RELAYFS_CHANNEL_VERSION >= 4 || CONFIG_RELAY */ num = sizeof(out); if (copy_to_user(buf, &out, num)) diff --git a/runtime/transport/relayfs-config.h.in b/runtime/transport/relayfs-config.h.in deleted file mode 100644 index 57fcc053..00000000 --- a/runtime/transport/relayfs-config.h.in +++ /dev/null @@ -1,2 +0,0 @@ -/* relayfs version ge 4 */ -#define RELAYFS_VERSION_GE_4 @RELAYFS_VERSION_GE_4@ diff --git a/runtime/transport/relayfs.c b/runtime/transport/relayfs.c index 6cf240fd..3672c453 100644 --- a/runtime/transport/relayfs.c +++ b/runtime/transport/relayfs.c @@ -20,7 +20,7 @@ #include "relayfs.h" -#if RELAYFS_VERSION_GE_4 || defined (CONFIG_RELAY) +#if (RELAYFS_CHANNEL_VERSION >= 4) || defined (CONFIG_RELAY) /** * _stp_subbuf_start - subbuf_start() relayfs callback implementation @@ -69,7 +69,7 @@ static void _stp_buf_full(struct rchan_buf *buf, *((unsigned *)subbuf) = padding; } -#endif /* RELAYFS_VERSION_GE_4 || CONFIG_RELAY */ +#endif /* RELAYFS_CHANNEL_VERSION >= 4 || CONFIG_RELAY */ #if defined (CONFIG_RELAY) static struct dentry *_stp_create_buf_file(const char *filename, @@ -122,9 +122,9 @@ static struct rchan_callbacks stp_rchan_callbacks = static struct rchan_callbacks stp_rchan_callbacks = { .subbuf_start = _stp_subbuf_start, -#if !RELAYFS_VERSION_GE_4 +#if (RELAYFS_CHANNEL_VERSION < 4) .buf_full = _stp_buf_full, -#endif /* !RELAYFS_VERSION_GE_4 */ +#endif /* RELAYFS_CHANNEL_VERSION < 4 */ }; #endif /* CONFIG_RELAY */ @@ -213,13 +213,13 @@ struct rchan *_stp_relayfs_open(unsigned n_subbufs, return NULL; } -#if RELAYFS_VERSION_GE_4 +#if (RELAYFS_CHANNEL_VERSION >= 4) chan = relay_open("cpu", dir, subbuf_size, n_subbufs, &stp_rchan_callbacks); #else chan = relay_open("cpu", dir, subbuf_size, n_subbufs, 0, &stp_rchan_callbacks); -#endif /* RELAYFS_VERSION_GE_4 */ +#endif /* RELAYFS_CHANNEL_VERSION >= 4 */ if (!chan) { printk("STP: couldn't create relayfs channel.\n"); diff --git a/runtime/transport/relayfs.h b/runtime/transport/relayfs.h index aafb26b2..c871db31 100644 --- a/runtime/transport/relayfs.h +++ b/runtime/transport/relayfs.h @@ -5,8 +5,6 @@ * @brief Header file for relayfs transport */ -#include "relayfs-config.h" - #if defined (CONFIG_RELAYFS_FS) || defined (CONFIG_RELAYFS_FS_MODULE) # include <linux/relayfs_fs.h> #elif defined (CONFIG_RELAY) diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index 01bab497..3acd152e 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -82,13 +82,13 @@ static void _stp_handle_buf_info(int *cpuptr) struct buf_info out; out.cpu = *cpuptr; -#if RELAYFS_VERSION_GE_4 || defined (CONFIG_RELAY) +#if (RELAYFS_CHANNEL_VERSION >= 4) || defined (CONFIG_RELAY) out.produced = _stp_chan->buf[*cpuptr]->subbufs_produced; out.consumed = _stp_chan->buf[*cpuptr]->subbufs_consumed; #else out.produced = atomic_read(&_stp_chan->buf[*cpuptr]->subbufs_produced); out.consumed = atomic_read(&_stp_chan->buf[*cpuptr]->subbufs_consumed); -#endif /* RELAYFS_VERSION_GE_4 || CONFIG_RELAY */ +#endif /* RELAYFS_CHANNEL_VERSION >=_4 || CONFIG_RELAY */ _stp_transport_send(STP_BUF_INFO, &out, sizeof(out)); } |