Commit 4c9a76c3 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Merge branch 'configure-sleep-sem-threhold' into 'master'

make sleep semaphore threshold configurable

See merge request i4/manycore/emper!378
parents 2ab1777a 0da9832c
......@@ -160,7 +160,12 @@ class AbstractSemaphoreWorkerSleepStrategy
* reviewed and potentially changed to '-1'.
* skipWakeupThreshold = 0;
*/
const typename Sem::CounterType skipWakeupThreshold = workerCount;
typename Sem::CounterType skipWakeupThreshold;
if constexpr (callerEnvironment == CallerEnvironment::ANYWHERE) {
skipWakeupThreshold = workerCount;
} else {
skipWakeupThreshold = EMPER_SLEEP_SEM_THRESHOLD;
}
auto semValue = wakeupSem.getValue();
return semValue <= skipWakeupThreshold;
......
......@@ -89,6 +89,7 @@ else
endif
conf_data.set('EMPER_SLEEP_SEM_THRESHOLD', get_option('sleep_sem_threshold'))
conf_data.set('EMPER_WORKER_SLEEP', get_option('worker_sleep'))
conf_data.set('EMPER_WORKER_WAKEUP_STRATEGY', get_option('worker_wakeup_strategy'))
conf_data.set('EMPER_WORKER_IGNORE_WAKEUP_HINT', get_option('worker_ignore_wakeup_hint'))
......
option(
'sleep_sem_threshold',
type: 'combo',
choices: ['0', 'workerCount'],
value: 'workerCount',
description: 'Threshold skipping the notification'
)
option(
'use_bundled_deps',
type: 'combo',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment