leveldb/port
costan 7d8e41e49b leveldb: Replace AtomicPointer with std::atomic.
This CL removes AtomicPointer from leveldb's port interface. Its usage is replaced with std::atomic<> from the C++11 standard library.

AtomicPointer was used to wrap flags, numbers, and pointers, so its instances are replaced with std::atomic<bool>, std::atomic<int>, std::atomic<size_t> and std::atomic<Node*>.

This CL does not revise the memory ordering. AtomicPointer's methods are replaced mechanically with their std::atomic equivalents, even when the underlying usage is incorrect. (Example: DBImpl::has_imm_ is written using release stores, even though it is always read using relaxed ordering.) Revising the memory ordering is left for future CLs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237865146
2019-03-11 13:41:25 -07:00
..
port_config.h.in leveldb: Fix PosixWritableFile::Sync() on Apple systems. 2019-01-09 14:58:22 -08:00
port_example.h leveldb: Replace AtomicPointer with std::atomic. 2019-03-11 13:41:25 -07:00
port_stdcxx.h leveldb: Replace AtomicPointer with std::atomic. 2019-03-11 13:41:25 -07:00
port.h Added native support for Windows. 2019-03-01 18:00:35 -08:00
README Replace port_posix with port_stdcxx. 2018-04-17 13:26:47 -07:00
thread_annotations.h Enable thread safety annotations in open source version. 2018-02-13 22:40:41 -08:00

This directory contains interfaces and implementations that isolate the
rest of the package from platform details.

Code in the rest of the package includes "port.h" from this directory.
"port.h" in turn includes a platform specific "port_<platform>.h" file
that provides the platform specific implementation.

See port_stdcxx.h for an example of what must be provided in a platform
specific header file.