mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-27 09:01:50 +03:00
Implemented thread service support.
Added a wsrep::thread_service interface to allow application to inject instrumented thread, mutex and condition variable implementation for provider. The interface is defined in include/wsrep/thread_service.hpp. Sample implementation is provided in dbsim/db_threads.[h|c]pp. This patch will also clean up some remaining dependencies to wsrep-API compilation units so that the dependency to wsrep-API is header only. This will extending the provider support to later wsrep-API versions.
This commit is contained in:
@ -72,7 +72,16 @@ db::params db::parse_args(int argc, char** argv)
|
||||
("debug-log-level", po::value<int>(¶ms.debug_log_level),
|
||||
"debug logging level: 0 - none, 1 - verbose")
|
||||
("fast-exit", po::value<int>(¶ms.fast_exit),
|
||||
"exit from simulation without graceful shutdown");
|
||||
"exit from simulation without graceful shutdown")
|
||||
("ti",
|
||||
po::value<int>(¶ms.thread_instrumentation),
|
||||
"use instrumentation for threads/mutexes/condition variables"
|
||||
"(0 default disabled, 1 total counts, 2 per object)")
|
||||
("ti-cond-checks",
|
||||
po::value<bool>(¶ms.cond_checks),
|
||||
"Enable checks for correct condition variable use. "
|
||||
" Effective only if thread-instrumentation is enabled")
|
||||
;
|
||||
try
|
||||
{
|
||||
po::variables_map vm;
|
||||
@ -86,8 +95,14 @@ db::params db::parse_args(int argc, char** argv)
|
||||
|
||||
validate_params(params);
|
||||
}
|
||||
catch (const po::error& e)
|
||||
{
|
||||
std::cerr << "Error parsing arguments: " << e.what() << "\n";
|
||||
exit(1);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "Error parsing arguments\n";
|
||||
std::cerr << desc << "\n";
|
||||
exit(1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user