From 82c7381731e28366e08d9407276bfa8408d24c29 Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 22 Mar 2010 13:41:02 -0500 Subject: [PATCH] Ifdef out atomic_long_read() body on older kernels where the type doesn't exist. * tapset/atomic.stp: If we don't have ATOMIC_LOGN_INIT(), ifdef out the function. --- tapset/atomic.stp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tapset/atomic.stp b/tapset/atomic.stp index d0581455c..ab20eb5ed 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 %} -- 2.43.5