Loading CMakeLists.txt +7 −18 Original line number Diff line number Diff line Loading @@ -122,9 +122,6 @@ set(MAX_INTERNAL_FDS 256 CACHE STRING "Number of file descriptors reserved for i add_definitions(-DMAX_INTERNAL_FDS=${MAX_INTERNAL_FDS}) message(STATUS "File descriptors reserved for internal use: ${MAX_INTERNAL_FDS}") option(USE_BITSET_FOR_INTERNAL_FDS "Use std::bitset to track internal fds" ON) if(USE_BITSET_FOR_INTERNAL_FDS) add_definitions(-DUSE_BITSET_FOR_INTERNAL_FDS) execute_process(COMMAND getconf OPEN_MAX OUTPUT_VARIABLE GETCONF_MAX_FDS OUTPUT_STRIP_TRAILING_WHITESPACE Loading @@ -133,14 +130,6 @@ if(USE_BITSET_FOR_INTERNAL_FDS) set(GETCONF_MAX_FDS=512) endif() add_definitions(-DMAX_OPEN_FDS=${GETCONF_MAX_FDS}) endif() message(STATUS "Use std::bitset for internal fd tracking: ${USE_BITSET_FOR_INTERNAL_FDS}") if(USE_BITSET_FOR_INTERNAL_FDS) message(STATUS "Max open files: ${GETCONF_MAX_FDS}") endif() option(ENABLE_LOGGING "Disable all logging messages" ON) if(NOT ENABLE_LOGGING) Loading include/client/preload_context.hpp +0 −7 Original line number Diff line number Diff line Loading @@ -21,9 +21,7 @@ #include <vector> #include <string> #ifdef USE_BITSET_FOR_INTERNAL_FDS #include <bitset> #endif // USE_BITSET_FOR_INTERNAL_FDS /* Forward declarations */ class OpenFileMap; Loading Loading @@ -77,13 +75,8 @@ class PreloadContext { bool interception_enabled_; #ifdef USE_BITSET_FOR_INTERNAL_FDS std::bitset<MAX_INTERNAL_FDS> internal_fds_; mutable std::mutex internal_fds_mutex_; #else std::set<int> internal_fds_; #endif // USE_BITSET_FOR_INTERNAL_FDS public: static PreloadContext* getInstance() { Loading src/client/preload_context.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -33,10 +33,7 @@ PreloadContext::PreloadContext(): ofm_(std::make_shared<OpenFileMap>()), fs_conf_(std::make_shared<FsConfig>()) { #ifdef USE_BITSET_FOR_INTERNAL_FDS internal_fds_.set(); #endif // USE_BITSET_FOR_INTERNAL_FDS } void Loading Loading
CMakeLists.txt +7 −18 Original line number Diff line number Diff line Loading @@ -122,9 +122,6 @@ set(MAX_INTERNAL_FDS 256 CACHE STRING "Number of file descriptors reserved for i add_definitions(-DMAX_INTERNAL_FDS=${MAX_INTERNAL_FDS}) message(STATUS "File descriptors reserved for internal use: ${MAX_INTERNAL_FDS}") option(USE_BITSET_FOR_INTERNAL_FDS "Use std::bitset to track internal fds" ON) if(USE_BITSET_FOR_INTERNAL_FDS) add_definitions(-DUSE_BITSET_FOR_INTERNAL_FDS) execute_process(COMMAND getconf OPEN_MAX OUTPUT_VARIABLE GETCONF_MAX_FDS OUTPUT_STRIP_TRAILING_WHITESPACE Loading @@ -133,14 +130,6 @@ if(USE_BITSET_FOR_INTERNAL_FDS) set(GETCONF_MAX_FDS=512) endif() add_definitions(-DMAX_OPEN_FDS=${GETCONF_MAX_FDS}) endif() message(STATUS "Use std::bitset for internal fd tracking: ${USE_BITSET_FOR_INTERNAL_FDS}") if(USE_BITSET_FOR_INTERNAL_FDS) message(STATUS "Max open files: ${GETCONF_MAX_FDS}") endif() option(ENABLE_LOGGING "Disable all logging messages" ON) if(NOT ENABLE_LOGGING) Loading
include/client/preload_context.hpp +0 −7 Original line number Diff line number Diff line Loading @@ -21,9 +21,7 @@ #include <vector> #include <string> #ifdef USE_BITSET_FOR_INTERNAL_FDS #include <bitset> #endif // USE_BITSET_FOR_INTERNAL_FDS /* Forward declarations */ class OpenFileMap; Loading Loading @@ -77,13 +75,8 @@ class PreloadContext { bool interception_enabled_; #ifdef USE_BITSET_FOR_INTERNAL_FDS std::bitset<MAX_INTERNAL_FDS> internal_fds_; mutable std::mutex internal_fds_mutex_; #else std::set<int> internal_fds_; #endif // USE_BITSET_FOR_INTERNAL_FDS public: static PreloadContext* getInstance() { Loading
src/client/preload_context.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -33,10 +33,7 @@ PreloadContext::PreloadContext(): ofm_(std::make_shared<OpenFileMap>()), fs_conf_(std::make_shared<FsConfig>()) { #ifdef USE_BITSET_FOR_INTERNAL_FDS internal_fds_.set(); #endif // USE_BITSET_FOR_INTERNAL_FDS } void Loading