]> sourceware.org Git - systemtap.git/commitdiff
Ifdef out atomic_long_read() body on older kernels where the type doesn't exist.
authorDavid Smith <dsmith@redhat.com>
Mon, 22 Mar 2010 18:41:02 +0000 (13:41 -0500)
committerDavid Smith <dsmith@redhat.com>
Mon, 22 Mar 2010 18:41:02 +0000 (13:41 -0500)
* tapset/atomic.stp: If we don't have ATOMIC_LOGN_INIT(), ifdef out the
  function.

tapset/atomic.stp

index d0581455c7c0f43af62c9eb5eebf8cc572cd43f7..ab20eb5ed56b6d6c2b6de76b02b6b1c409334d79 100644 (file)
@@ -8,6 +8,7 @@
 
 function atomic_long_read:long(addr:long)
 %{ /* pure */
+#ifdef ATOMIC_LONG_INIT
        atomic_long_t *a = (atomic_long_t *)(long)THIS->addr;
 
        /* We call deref() here to ensure the memory is valid to read.
@@ -16,4 +17,5 @@ function atomic_long_read:long(addr:long)
        (void)deref(sizeof(*a), a);
        THIS->__retvalue = atomic_long_read(a);
        CATCH_DEREF_FAULT();
+#endif
 %}
This page took 0.029557 seconds and 5 git commands to generate.