diff options
author | zhaolei <zhaolei> | 2007-11-08 02:02:47 +0000 |
---|---|---|
committer | zhaolei <zhaolei> | 2007-11-08 02:02:47 +0000 |
commit | 24d9a13ab430d7dcaf317dbad674cc598b0a7b2c (patch) | |
tree | 7270f19de19a0e06595150b20d553024fcb7333b /tapset | |
parent | 87c1d6855f291caa357d1bedd09207a23118debe (diff) | |
download | systemtap-steved-24d9a13ab430d7dcaf317dbad674cc598b0a7b2c.tar.gz systemtap-steved-24d9a13ab430d7dcaf317dbad674cc598b0a7b2c.tar.xz systemtap-steved-24d9a13ab430d7dcaf317dbad674cc598b0a7b2c.zip |
2007-11-8 Zhaolei <zhaolei@cn.fujitsu.com>
From Lai Jiangshan <laijs@cn.fujitsu.com>
* rpc.stp (clones_from_clnt): Use deref to check, then use
atomic_read to read an atomic_t to avoid compilation error of
type matching.
(tasks_from_clnt): Ditto.
Diffstat (limited to 'tapset')
-rw-r--r-- | tapset/ChangeLog | 8 | ||||
-rw-r--r-- | tapset/rpc.stp | 12 |
2 files changed, 14 insertions, 6 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 07066978..ecab4aea 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,11 @@ +2007-11-8 Zhaolei <zhaolei@cn.fujitsu.com> + + From Lai Jiangshan <laijs@cn.fujitsu.com> + * rpc.stp (clones_from_clnt): Use deref to check, then use + atomic_read to read an atomic_t to avoid compilation error of + type matching. + (tasks_from_clnt): Ditto. + 2007-11-6 Zhaolei <zhaolei@cn.fujitsu.com> From Cai Fei <caifei@cn.fujitsu.com> diff --git a/tapset/rpc.stp b/tapset/rpc.stp index f9390054..537bf348 100644 --- a/tapset/rpc.stp +++ b/tapset/rpc.stp @@ -950,22 +950,22 @@ function port_from_clnt:long(clnt:long) function clones_from_clnt:long(clnt:long) %{ /* pure */ struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt; + THIS->__retvalue = -1; #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22) - THIS->__retvalue = kread(&(clnt->cl_count)); + deref(sizeof(clnt->cl_count), &(clnt->cl_count)); + THIS->__retvalue = atomic_read(&(clnt->cl_count)); CATCH_DEREF_FAULT(); -#else - THIS->__retvalue = -1; #endif %} function tasks_from_clnt:long(clnt:long) %{ /* pure */ struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt; + THIS->__retvalue = -1; #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22) - THIS->__retvalue = kread(&(clnt->cl_users)); + deref(sizeof(clnt->cl_users), &(clnt->cl_users)); + THIS->__retvalue = atomic_read(&(clnt->cl_users)); CATCH_DEREF_FAULT(); -#else - THIS->__retvalue = -1; #endif %} |