MB-19281: [BP] Add template class RelaxedAtomic<> 69/63169/4
authorDave Rigby <daver@couchbase.com>
Thu, 21 Apr 2016 08:38:54 +0000 (09:38 +0100)
committerChiyoung Seo <chiyoung@couchbase.com>
Sat, 23 Apr 2016 01:08:49 +0000 (01:08 +0000)
commitaec8019f0af7a1f7e4e7a6e40f1ba5af63a94574
tree5408f3cf3170917880e7a22db07116e020b4ccb0
parent4bc74ba88f412cc54f45ec7b1a2cb07e095fdea1
MB-19281: [BP] Add template class RelaxedAtomic<>

Backport of the RelaxedAtomic template class from
platform/watson. Changed from C++11 std::atomic<> to our own
AtomicValue<> as 3.x doesn't have C++11 support on all platforms, and
moved to ep-engine as AtomicValue is an ep-engine specific class.

Doesn't include unit tests as they depend on GTest which isn't present
in 3.0.x.

Merge of the following platform commits:

* http://review.couchbase.org/54973 - Add template class RelaxedAtomic<>
* http://review.couchbase.org/55870 - RelaxedAtomic: Allow construction from template type
* http://review.couchbase.org/55889 - RelaxedAtomic: Remove 'explicit' definition for copy constructor

Change-Id: I16a5e2ebe85201aae85592329a2212c8a5c3a464
Reviewed-on: http://review.couchbase.org/63169
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
src/relaxed_atomic.h [new file with mode: 0644]