mirror of
https://github.com/google/leveldb.git
synced 2025-01-07 04:50:09 +08:00
f57e23351f
This revision adds two major changes: 1. build_detect_platform which generates build_config.mk with platform-dependent flags for the build process 2. /port/atomic_pointer.h with anAtomicPointerimplementation for platforms without <cstdatomic> Some of this code is loosely based on patches submitted to the LevelDB mailing list at https://groups.google.com/forum/#!forum/leveldb Tip of the hat to Dave Smith and Edouard A, who both sent patches. The presence of Snappy (http://code.google.com/p/snappy/) and cstdatomic are now both detected in the build_detect_platform script (1.) which gets executing during make. For (2.), instead of broadly importing atomicops_* from Chromium or the Google performance tools, we chose to just implement AtomicPointer and the limited atomic load and store operations it needs. This resulted in much less code and fewer files - everything is contained in atomic_pointer.h. git-svn-id: https://leveldb.googlecode.com/svn/trunk@34 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_osx.cc | ||
port_osx.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.