diff options
author | trz <trz> | 2005-10-14 21:53:51 +0000 |
---|---|---|
committer | trz <trz> | 2005-10-14 21:53:51 +0000 |
commit | 08b40d88c111a077b1069babb6a51a2b68aef1a6 (patch) | |
tree | fbfb0d0149af6afd4be71240d39918732e0ac0aa /runtime/transport/procfs.c | |
parent | 20b1a57d555b30478e224eec7c358ee3f7c7a6e9 (diff) | |
download | systemtap-steved-08b40d88c111a077b1069babb6a51a2b68aef1a6.tar.gz systemtap-steved-08b40d88c111a077b1069babb6a51a2b68aef1a6.tar.xz systemtap-steved-08b40d88c111a077b1069babb6a51a2b68aef1a6.zip |
Added #ifdef'ed support for kernels containing the recent relayfs API changes
Diffstat (limited to 'runtime/transport/procfs.c')
-rw-r--r-- | runtime/transport/procfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c index f22be8fa..7bba3033 100644 --- a/runtime/transport/procfs.c +++ b/runtime/transport/procfs.c @@ -31,8 +31,13 @@ _stp_proc_read (struct file *file, char __user *buf, size_t count, loff_t *ppos) return -EINVAL; out.cpu = cpu; +#ifdef RELAYFS_VERSION_GE_4 + 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 */ num = sizeof(out); if (copy_to_user(buf, &out, num)) |