You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2015/11/12 17:40:45 UTC
trafficserver git commit: Remove more unnecessary TS_HAS_128BIT_CAS
ifdeffery.
Repository: trafficserver
Updated Branches:
refs/heads/master 906d45ac0 -> e2967b5b9
Remove more unnecessary TS_HAS_128BIT_CAS ifdeffery.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e2967b5b
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e2967b5b
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e2967b5b
Branch: refs/heads/master
Commit: e2967b5b9efb94d8caec85b4c949177a6e09b48c
Parents: 906d45a
Author: James Peach <jp...@apache.org>
Authored: Thu Nov 12 08:40:37 2015 -0800
Committer: James Peach <jp...@apache.org>
Committed: Thu Nov 12 08:40:37 2015 -0800
----------------------------------------------------------------------
proxy/logging/LogObject.cc | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e2967b5b/proxy/logging/LogObject.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc
index bb67a25..dd272b6 100644
--- a/proxy/logging/LogObject.cc
+++ b/proxy/logging/LogObject.cc
@@ -393,11 +393,7 @@ LogObject::_checkout_write(size_t *write_offset, size_t bytes_needed)
INK_QUEUE_LD(h, m_log_buffer);
head_p new_h;
SET_FREELIST_POINTER_VERSION(new_h, FREELIST_POINTER(h), FREELIST_VERSION(h) + 1);
-#if TS_HAS_128BIT_CAS
- result = ink_atomic_cas((__int128_t *)&m_log_buffer.data, h.data, new_h.data);
-#else
- result = ink_atomic_cas((int64_t *)&m_log_buffer.data, h.data, new_h.data);
-#endif
+ result = ink_atomic_cas(&m_log_buffer.data, h.data, new_h.data);
} while (!result);
buffer = (LogBuffer *)FREELIST_POINTER(h);
result_code = buffer->checkout_write(write_offset, bytes_needed);
@@ -430,11 +426,7 @@ LogObject::_checkout_write(size_t *write_offset, size_t bytes_needed)
}
head_p tmp_h;
SET_FREELIST_POINTER_VERSION(tmp_h, new_buffer, 0);
-#if TS_HAS_128BIT_CAS
- result = ink_atomic_cas((__int128_t *)&m_log_buffer.data, old_h.data, tmp_h.data);
-#else
- result = ink_atomic_cas((int64_t *)&m_log_buffer.data, old_h.data, tmp_h.data);
-#endif
+ result = ink_atomic_cas(&m_log_buffer.data, old_h.data, tmp_h.data);
} while (!result);
if (FREELIST_POINTER(old_h) == FREELIST_POINTER(h)) {
ink_atomic_increment(&buffer->m_references, FREELIST_VERSION(old_h) - 1);
@@ -472,11 +464,7 @@ LogObject::_checkout_write(size_t *write_offset, size_t bytes_needed)
break;
head_p tmp_h;
SET_FREELIST_POINTER_VERSION(tmp_h, FREELIST_POINTER(h), FREELIST_VERSION(old_h) - 1);
-#if TS_HAS_128BIT_CAS
- result = ink_atomic_cas((__int128_t *)&m_log_buffer.data, old_h.data, tmp_h.data);
-#else
- result = ink_atomic_cas((int64_t *)&m_log_buffer.data, old_h.data, tmp_h.data);
-#endif
+ result = ink_atomic_cas(&m_log_buffer.data, old_h.data, tmp_h.data);
} while (!result);
if (FREELIST_POINTER(old_h) != FREELIST_POINTER(h))
ink_atomic_increment(&buffer->m_references, -1);