[Pkg-javascript-commits] [node-leveldown] 295/492: (properly) remove atomic pointer win code
Andrew Kelley
andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:14:10 UTC 2014
This is an automated email from the git hooks/post-receive script.
andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.
commit e0cf4110b9bc1a72a032a54c663166341613aca2
Author: Rod Vagg <rod at vagg.org>
Date: Sat Mar 30 17:14:32 2013 +1100
(properly) remove atomic pointer win code
---
deps/leveldb/leveldb-1.9.0/port/atomic_pointer.h | 41 ------------------------
1 file changed, 41 deletions(-)
diff --git a/deps/leveldb/leveldb-1.9.0/port/atomic_pointer.h b/deps/leveldb/leveldb-1.9.0/port/atomic_pointer.h
index f5fbf65..e17bf43 100644
--- a/deps/leveldb/leveldb-1.9.0/port/atomic_pointer.h
+++ b/deps/leveldb/leveldb-1.9.0/port/atomic_pointer.h
@@ -207,47 +207,6 @@ class AtomicPointer {
inline void NoBarrier_Store(void* v) { rep_ = v; }
};
-#elif defined(_MSC_VER)
-// credit: https://groups.google.com/forum/#!msg/leveldb/VuECZMnsob4/F6pGPGaK-XwJ
-
-class AtomicPointer {
- private:
- void* rep_;
-
- public:
- AtomicPointer () {}
- explicit AtomicPointer(void* v) {
- InterlockedExchangePointer(&rep_, v);
- }
-
- // Read and return the stored pointer with the guarantee that no
- // later memory access (read or write) by this thread can be
- // reordered ahead of this read.
- inline void* Acquire_Load() const {
- void* r;
- InterlockedExchangePointer(&r, rep_ );
- return r;
- }
-
- // Set v as the stored pointer with the guarantee that no earlier
- // memory access (read or write) by this thread can be reordered
- // after this store.
- inline void Release_Store(void* v) {
- InterlockedExchangePointer(&rep_, v);
- }
-
- // Read the stored pointer with no ordering guarantees.
- inline void* NoBarrier_Load() const {
- void* r = reinterpret_cast<void*>(rep_);
- return r;
- }
-
- // Set va as the stored pointer with no ordering guarantees.
- inline void NoBarrier_Store(void* v) {
- rep_ = reinterpret_cast<void*>(v);
- }
-};
-
// We have neither MemoryBarrier(), nor <cstdatomic>
#else
#error Please implement AtomicPointer for this platform.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git
More information about the Pkg-javascript-commits
mailing list