diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2003-11-16 01:33:02 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2003-11-16 01:33:02 +0000 |
commit | 69df48a0efe7e81e726dcff34e8357f506eae60a (patch) | |
tree | c53582362ea826e49939dd1e74c1670519d94b68 /locks | |
parent | 8ba33e3742952263e6480e03f6b7e9fb5e876806 (diff) | |
download | libapr-69df48a0efe7e81e726dcff34e8357f506eae60a.tar.gz |
axing deprecated apr_atomic_foo functions
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64747 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks')
-rw-r--r-- | locks/unix/thread_mutex.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/locks/unix/thread_mutex.c b/locks/unix/thread_mutex.c index db637cdf0..306b02174 100644 --- a/locks/unix/thread_mutex.c +++ b/locks/unix/thread_mutex.c @@ -114,7 +114,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_lock(apr_thread_mutex_t *mutex) * testing the mutex is owned by this thread, so a deadlock is expected. */ if (apr_os_thread_equal(mutex->owner, apr_os_thread_current())) { - apr_atomic_inc(&mutex->owner_ref); + apr_atomic_inc32(&mutex->owner_ref); return APR_SUCCESS; } @@ -126,7 +126,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_lock(apr_thread_mutex_t *mutex) return rv; } - if (apr_atomic_cas(&mutex->owner_ref, 1, 0) != 0) { + if (apr_atomic_cas32(&mutex->owner_ref, 1, 0) != 0) { /* The owner_ref should be zero when the lock is not held, * if owner_ref was non-zero we have a mutex reference bug. * XXX: so now what? @@ -162,7 +162,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex) * the trylock. */ if (apr_os_thread_equal(mutex->owner, apr_os_thread_current())) { - apr_atomic_inc(&mutex->owner_ref); + apr_atomic_inc32(&mutex->owner_ref); return APR_SUCCESS; } @@ -174,7 +174,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex) return (rv == EBUSY) ? APR_EBUSY : rv; } - if (apr_atomic_cas(&mutex->owner_ref, 1, 0) != 0) { + if (apr_atomic_cas32(&mutex->owner_ref, 1, 0) != 0) { /* The owner_ref should be zero when the lock is not held, * if owner_ref was non-zero we have a mutex reference bug. * XXX: so now what? @@ -215,7 +215,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex) return APR_EINVAL; } - if (apr_atomic_dec(&mutex->owner_ref) != 0) + if (apr_atomic_dec32(&mutex->owner_ref) != 0) return APR_SUCCESS; mutex->owner = 0; } |