From 309bc2083e96ce113f46a700af15288251623cca Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 22 Nov 2019 12:17:48 +0100 Subject: [PATCH] vbox5: raise rrtimer priority Make sure timers run at the same priority as component threads, otherwise no timer progress can be made. See 'rtTimeNanoTSInternalRef' (timesupref.h) and 'rtTimerLRThread' (timerlr-generic.cpp). --- repos/ports/src/virtualbox5/thread.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/repos/ports/src/virtualbox5/thread.cc b/repos/ports/src/virtualbox5/thread.cc index e8d8ff9441..779a974fa9 100644 --- a/repos/ports/src/virtualbox5/thread.cc +++ b/repos/ports/src/virtualbox5/thread.cc @@ -118,9 +118,15 @@ static int create_thread(pthread_t *thread, const pthread_attr_t *attr, */ } + /* + * Make sure timers run at the same priority as component threads, otherwise + * no timer progress can be made. See 'rtTimeNanoTSInternalRef' (timesupref.h) + * and 'rtTimerLRThread' (timerlr-generic.cpp) + */ + bool const rtthread_timer = rtthread->enmType == RTTHREADTYPE_TIMER; return Libc::pthread_create(thread, start_routine, arg, stack_size, rtthread->szName, - cpu_connection(rtthread->enmType), + rtthread_timer ? nullptr : cpu_connection(rtthread->enmType), Genode::Affinity::Location()); }