Updated Branches: refs/heads/master 63a7c5164 -> b0c74c9a5
TS-1385 A simpler fix for ARM atomics compile problem Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b0c74c9a Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b0c74c9a Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b0c74c9a Branch: refs/heads/master Commit: b0c74c9a51c950e33f7c1860e527b6c38dac9f48 Parents: fa3052a Author: Leif Hedstrom <[email protected]> Authored: Thu Aug 9 17:24:37 2012 -0600 Committer: Leif Hedstrom <[email protected]> Committed: Thu Aug 9 17:24:37 2012 -0600 ---------------------------------------------------------------------- lib/ts/ink_atomic.h | 6 ++++++ proxy/logging/LogBuffer.h | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b0c74c9a/lib/ts/ink_atomic.h ---------------------------------------------------------------------- diff --git a/lib/ts/ink_atomic.h b/lib/ts/ink_atomic.h index effe64e..7a59891 100644 --- a/lib/ts/ink_atomic.h +++ b/lib/ts/ink_atomic.h @@ -161,6 +161,12 @@ ink_atomic_increment<int64_t>(pvint64 mem, int64_t value) { return curr + value; } +template<> +inline int64_t +ink_atomic_increment<int64_t>(pvint64 mem, int value) { + return ink_atomic_increment(mem, static_cast<int64_t>(value)); +} + #endif /* not used for Intel Processors which have sequential(esque) consistency */ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b0c74c9a/proxy/logging/LogBuffer.h ---------------------------------------------------------------------- diff --git a/proxy/logging/LogBuffer.h b/proxy/logging/LogBuffer.h index 42b1aa6..072556a 100644 --- a/proxy/logging/LogBuffer.h +++ b/proxy/logging/LogBuffer.h @@ -101,14 +101,14 @@ struct LogBufferHeader union LB_State { - LB_State():ival(0) - { - }; + LB_State() + : ival(0) + { } LB_State(volatile LB_State & vs) { ival = vs.ival; - }; + } LB_State & operator =(volatile LB_State & vs) { @@ -116,7 +116,7 @@ union LB_State return *this; } - uint64_t ival; + int64_t ival; struct { uint16_t offset; // buffer should be <= 64KB
