summaryrefslogtreecommitdiffstats
path: root/tapset
diff options
context:
space:
mode:
Diffstat (limited to 'tapset')
-rw-r--r--tapset/atomic.stp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tapset/atomic.stp b/tapset/atomic.stp
index d0581455..ab20eb5e 100644
--- a/tapset/atomic.stp
+++ b/tapset/atomic.stp
@@ -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
%}