summaryrefslogtreecommitdiff
path: root/atomic/os390
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2003-11-05 03:39:33 +0000
committerJeff Trawick <trawick@apache.org>2003-11-05 03:39:33 +0000
commitc7a38bd21b14d40e2109022af250ed8ff83e7026 (patch)
tree36fccfd933207a0934563de81d82581106877f61 /atomic/os390
parent8b87f6b8560a6dad241e82384bc49ed91d88d33c (diff)
downloadapr-c7a38bd21b14d40e2109022af250ed8ff83e7026.tar.gz
fix type mismatch with picky compiler settings on z/OS
(volatile vs. non-volatile) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64720 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'atomic/os390')
-rw-r--r--atomic/os390/atomic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/atomic/os390/atomic.c b/atomic/os390/atomic.c
index 84fa8f8d9..caa1a5e26 100644
--- a/atomic/os390/atomic.c
+++ b/atomic/os390/atomic.c
@@ -58,24 +58,24 @@
#if APR_HAS_THREADS
-apr_int32_t apr_atomic_add(apr_atomic_t *mem, apr_int32_t val)
+apr_int32_t apr_atomic_add(volatile apr_atomic_t *mem, apr_int32_t val)
{
apr_atomic_t old, new_val;
old = *mem; /* old is automatically updated on cs failure */
do {
new_val = old + val;
- } while (__cs(&old, mem, new_val));
+ } while (__cs(&old, (cs_t *)mem, new_val));
return new_val;
}
-apr_uint32_t apr_atomic_cas(apr_atomic_t *mem, apr_uint32_t swap,
+apr_uint32_t apr_atomic_cas(volatile apr_atomic_t *mem, apr_uint32_t swap,
apr_uint32_t cmp)
{
apr_uint32_t old = cmp;
- __cs(&old, mem, swap);
+ __cs(&old, (cs_t *)mem, swap);
return old; /* old is automatically updated from mem on cs failure */
}