mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 13:46:07 +00:00
[scudo] Condition variable can be disabled by setting the flag to off (#77532)
To enable the condition variable, you have to define both UseConditionVariable and the ConditionVariableT. Otherwise, it'll be disabled. However, you may want to disable the condition variable by setting UseConditionVariable=false, for example, while measuring the performance and you want to turn it off temporarily. Instead of requiring the removal of the variable, examining its value makes more sense.
This commit is contained in:
parent
3358c77b01
commit
e6c2952eb5
@ -51,7 +51,7 @@ struct ConditionVariableState {
|
||||
|
||||
template <typename Config>
|
||||
struct ConditionVariableState<Config, decltype(Config::UseConditionVariable)> {
|
||||
static constexpr bool enabled() { return true; }
|
||||
static constexpr bool enabled() { return Config::UseConditionVariable; }
|
||||
using ConditionVariableT = typename Config::ConditionVariableT;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user