Skip to content

Commit

Permalink
Only boolean config options use HPX_WITH_XXX and HPX_HAVE_XXX prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
biddisco committed Jul 25, 2017
1 parent 1024b04 commit 597bb70
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Expand Up @@ -547,12 +547,12 @@ endif()
# them. Note: terminated threads are cleaned up either when this number is
# reached for a particular thread queue or if the HPX_BUSY_LOOP_COUNT_MAX is
# reached, which will clean up the terminated threads for _all_ thread queues.
hpx_option(HPX_WITH_SCHEDULER_MAX_TERMINATED_THREADS STRING
hpx_option(HPX_SCHEDULER_MAX_TERMINATED_THREADS STRING
"Maximum number of terminated threads collected before those are cleaned up (default: 100)"
"100" CATEGORY "Thread Manager" ADVANCED)

hpx_add_config_define(HPX_HAVE_SCHEDULER_MAX_TERMINATED_THREADS
${HPX_WITH_SCHEDULER_MAX_TERMINATED_THREADS})
hpx_add_config_define(HPX_SCHEDULER_MAX_TERMINATED_THREADS
${HPX_SCHEDULER_MAX_TERMINATED_THREADS})

hpx_option(HPX_WITH_SWAP_CONTEXT_EMULATION BOOL
"Emulate SwapContext API for coroutines (default: OFF)"
Expand Down
3 changes: 1 addition & 2 deletions hpx/runtime/threads/policies/thread_queue.hpp
Expand Up @@ -28,7 +28,6 @@

#include <boost/atomic.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/preprocessor/stringize.hpp>

#include <cstddef>
#include <cstdint>
Expand Down Expand Up @@ -125,7 +124,7 @@ namespace hpx { namespace threads { namespace policies
static int max_terminated_threads =
boost::lexical_cast<int>(hpx::get_config_entry(
"hpx.thread_queue.max_terminated_threads",
std::to_string(HPX_HAVE_SCHEDULER_MAX_TERMINATED_THREADS)));
std::to_string(HPX_SCHEDULER_MAX_TERMINATED_THREADS)));
return max_terminated_threads;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/util/runtime_configuration.cpp
Expand Up @@ -240,7 +240,7 @@ namespace hpx { namespace util
"max_add_new_count = ${HPX_THREAD_QUEUE_MAX_ADD_NEW_COUNT:10}",
"max_delete_count = ${HPX_THREAD_QUEUE_MAX_DELETE_COUNT:1000}",
"max_terminated_threads = ${HPX_THREAD_QUEUE_MAX_TERMINATED_THREADS:"
BOOST_STRINGIZE(HPX_HAVE_SCHEDULER_MAX_TERMINATED_THREADS) "}",
HPX_PP_STRINGIZE(HPX_PP_EXPAND(HPX_SCHEDULER_MAX_TERMINATED_THREADS)) "}",

"[hpx.commandline]",
// enable aliasing
Expand Down

0 comments on commit 597bb70

Please sign in to comment.