summaryrefslogtreecommitdiff
path: root/atomic
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2003-11-16 01:33:02 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2003-11-16 01:33:02 +0000
commit69df48a0efe7e81e726dcff34e8357f506eae60a (patch)
treec53582362ea826e49939dd1e74c1670519d94b68 /atomic
parent8ba33e3742952263e6480e03f6b7e9fb5e876806 (diff)
downloadlibapr-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 'atomic')
-rw-r--r--atomic/os390/atomic.c6
-rw-r--r--atomic/unix/apr_atomic.c100
2 files changed, 3 insertions, 103 deletions
diff --git a/atomic/os390/atomic.c b/atomic/os390/atomic.c
index caa1a5e26..1c6d7db1b 100644
--- a/atomic/os390/atomic.c
+++ b/atomic/os390/atomic.c
@@ -58,7 +58,7 @@
#if APR_HAS_THREADS
-apr_int32_t apr_atomic_add(volatile apr_atomic_t *mem, apr_int32_t val)
+apr_int32_t apr_atomic_add32(volatile apr_atomic_t *mem, apr_int32_t val)
{
apr_atomic_t old, new_val;
@@ -70,8 +70,8 @@ apr_int32_t apr_atomic_add(volatile apr_atomic_t *mem, apr_int32_t val)
return new_val;
}
-apr_uint32_t apr_atomic_cas(volatile apr_atomic_t *mem, apr_uint32_t swap,
- apr_uint32_t cmp)
+apr_uint32_t apr_atomic_cas32(volatile apr_atomic_t *mem, apr_uint32_t swap,
+ apr_uint32_t cmp)
{
apr_uint32_t old = cmp;
diff --git a/atomic/unix/apr_atomic.c b/atomic/unix/apr_atomic.c
index 16912b968..34ef54275 100644
--- a/atomic/unix/apr_atomic.c
+++ b/atomic/unix/apr_atomic.c
@@ -84,106 +84,6 @@ apr_status_t apr_atomic_init(apr_pool_t *p)
}
#endif /*!defined(apr_atomic_init) && !defined(APR_OVERRIDE_ATOMIC_INIT) */
-#if !defined(apr_atomic_add) && !defined(APR_OVERRIDE_ATOMIC_ADD)
-void apr_atomic_add(volatile apr_atomic_t *mem, apr_uint32_t val)
-{
-#if APR_HAS_THREADS
- apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
- apr_uint32_t prev;
-
- if (apr_thread_mutex_lock(lock) == APR_SUCCESS) {
- prev = *mem;
- *mem += val;
- apr_thread_mutex_unlock(lock);
- }
-#else
- *mem += val;
-#endif /* APR_HAS_THREADS */
-}
-#endif /*!defined(apr_atomic_add) && !defined(APR_OVERRIDE_ATOMIC_ADD) */
-
-#if !defined(apr_atomic_set) && !defined(APR_OVERRIDE_ATOMIC_SET)
-void apr_atomic_set(volatile apr_atomic_t *mem, apr_uint32_t val)
-{
-#if APR_HAS_THREADS
- apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
- apr_uint32_t prev;
-
- if (apr_thread_mutex_lock(lock) == APR_SUCCESS) {
- prev = *mem;
- *mem = val;
- apr_thread_mutex_unlock(lock);
- }
-#else
- *mem = val;
-#endif /* APR_HAS_THREADS */
-}
-#endif /*!defined(apr_atomic_set) && !defined(APR_OVERRIDE_ATOMIC_SET) */
-
-#if !defined(apr_atomic_inc) && !defined(APR_OVERRIDE_ATOMIC_INC)
-void apr_atomic_inc(volatile apr_uint32_t *mem)
-{
-#if APR_HAS_THREADS
- apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
- apr_uint32_t prev;
-
- if (apr_thread_mutex_lock(lock) == APR_SUCCESS) {
- prev = *mem;
- (*mem)++;
- apr_thread_mutex_unlock(lock);
- }
-#else
- (*mem)++;
-#endif /* APR_HAS_THREADS */
-}
-#endif /*!defined(apr_atomic_inc) && !defined(APR_OVERRIDE_ATOMIC_INC) */
-
-#if !defined(apr_atomic_dec) && !defined(APR_OVERRIDE_ATOMIC_DEC)
-int apr_atomic_dec(volatile apr_atomic_t *mem)
-{
-#if APR_HAS_THREADS
- apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
- apr_uint32_t new;
-
- if (apr_thread_mutex_lock(lock) == APR_SUCCESS) {
- (*mem)--;
- new = *mem;
- apr_thread_mutex_unlock(lock);
- return new;
- }
-#else
- (*mem)--;
-#endif /* APR_HAS_THREADS */
- return *mem;
-}
-#endif /*!defined(apr_atomic_dec) && !defined(APR_OVERRIDE_ATOMIC_DEC) */
-
-#if !defined(apr_atomic_cas) && !defined(APR_OVERRIDE_ATOMIC_CAS)
-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)];
-
- if (apr_thread_mutex_lock(lock) == APR_SUCCESS) {
- prev = *(long*)mem;
- if (prev == cmp) {
- *(long*)mem = with;
- }
- apr_thread_mutex_unlock(lock);
- return prev;
- }
- return *(long*)mem;
-#else
- prev = *(long*)mem;
- if (prev == cmp) {
- *(long*)mem = with;
- }
- return prev;
-#endif /* APR_HAS_THREADS */
-}
-#endif /*!defined(apr_atomic_cas) && !defined(APR_OVERRIDE_ATOMIC_CAS) */
-
#if !defined(apr_atomic_add32) && !defined(APR_OVERRIDE_ATOMIC_ADD32)
void apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
{