rocksdb/port
Andrew Kryczka be421b0b16 portable sched_getcpu calls
Summary:
- added a feature test in build_detect_platform to check whether sched_getcpu() is available. glibc offers it only on some platforms (e.g., linux but not mac); this way should be easier than maintaining a list of platforms on which it's available.
- refactored PhysicalCoreID() to be simpler / less repetitive. ordered the conditional compilation clauses from most-to-least preferred
Closes https://github.com/facebook/rocksdb/pull/2272

Differential Revision: D5038093

Pulled By: ajkr

fbshipit-source-id: 81d7db3cc620250de220bdeb3194b2b3d7673de7
2017-05-10 12:29:23 -07:00
..
win Define CACHE_LINE_SIZE only when it's not defined 2017-05-08 16:12:28 -07:00
README reverting disastrous MOE commit, returning to r21 2011-04-19 23:11:15 +00:00
dirent.h Add GPLv2 as an alternative license. 2017-04-27 18:06:12 -07:00
likely.h Add GPLv2 as an alternative license. 2017-04-27 18:06:12 -07:00
port.h Add GPLv2 as an alternative license. 2017-04-27 18:06:12 -07:00
port_example.h Add GPLv2 as an alternative license. 2017-04-27 18:06:12 -07:00
port_posix.cc portable sched_getcpu calls 2017-05-10 12:29:23 -07:00
port_posix.h Define CACHE_LINE_SIZE only when it's not defined 2017-05-08 16:12:28 -07:00
stack_trace.cc Add GPLv2 as an alternative license. 2017-04-27 18:06:12 -07:00
stack_trace.h Add GPLv2 as an alternative license. 2017-04-27 18:06:12 -07:00
sys_time.h Add GPLv2 as an alternative license. 2017-04-27 18:06:12 -07:00
util_logger.h Add GPLv2 as an alternative license. 2017-04-27 18:06:12 -07:00
xpress.h Add GPLv2 as an alternative license. 2017-04-27 18:06:12 -07:00

README

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.