summaryrefslogtreecommitdiff
path: root/atomic
diff options
context:
space:
mode:
authorJustin Erenkrantz <jerenkrantz@apache.org>2002-09-01 17:15:05 +0000
committerJustin Erenkrantz <jerenkrantz@apache.org>2002-09-01 17:15:05 +0000
commitb6793bef385640821670959cc1979ae9b90ae5c3 (patch)
tree4b4d3a560878c24e8096e79045d13f98c7e9bbb9 /atomic
parent6039c835afb9dd6b596a2609594b849f194397ad (diff)
downloadapr-b6793bef385640821670959cc1979ae9b90ae5c3.tar.gz
Fix !APR_HAS_THREADS code path for apr_atomic_cas by always defining
prev. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63847 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'atomic')
-rw-r--r--atomic/unix/apr_atomic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/atomic/unix/apr_atomic.c b/atomic/unix/apr_atomic.c
index 0f69d610e..c4c98539a 100644
--- a/atomic/unix/apr_atomic.c
+++ b/atomic/unix/apr_atomic.c
@@ -161,9 +161,9 @@ int apr_atomic_dec(volatile apr_atomic_t *mem)
#if !defined(apr_atomic_cas) && !defined(APR_OVERRIDE_ATOMIC_CASE)
apr_uint32_t apr_atomic_cas(volatile apr_uint32_t *mem, long with, long cmp)
{
+ long prev;
#if APR_HAS_THREADS
apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
- long prev;
if (apr_thread_mutex_lock(lock) == APR_SUCCESS) {
prev = *(long*)mem;