mirror of
https://github.com/google/leveldb.git
synced 2024-12-19 01:57:47 +08:00
ed154f6dc4
Change atomic_pointer.h to prefer a memory barrier based implementation over a <cstdatomic> based implementation for the following reasons: (1) On a x86-32-bit gcc-4.4 build, <ctdatomic> was corrupting the AtomicPointer. (2) On a x86-64-bit gcc build, a <ctstdatomic> based acquire-load takes ~15ns as opposed to the ~1ns for a memory-barrier based implementation. Fixes issue 9 (corruption_test fails) http://code.google.com/p/leveldb/issues/detail?id=9 Fixes issue 16 (CorruptionTest.MissingDescriptor fails) http://code.google.com/p/leveldb/issues/detail?id=16 git-svn-id: https://leveldb.googlecode.com/svn/trunk@36 62dab493-f737-651d-591e-8d6aee1b9529 |
||
---|---|---|
.. | ||
win | ||
atomic_pointer.h | ||
port_android.cc | ||
port_android.h | ||
port_chromium.cc | ||
port_chromium.h | ||
port_example.h | ||
port_posix.cc | ||
port_posix.h | ||
port.h | ||
README | ||
sha1_portable.cc | ||
sha1_portable.h | ||
sha1_test.cc |
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_posix.h for an example of what must be provided in a platform specific header file.