mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 09:46:20 +00:00
vbox: use power of two priority levels
Avoids warnings of init in form of "priority band too small, losing least-significant priority bits" when virtualbox starts threads. Fixes #1323
This commit is contained in:
parent
51489e2f82
commit
6d02c4c89f
@ -42,8 +42,12 @@ static Genode::Cpu_session * get_cpu_session(RTTHREADTYPE type) {
|
||||
if (con[type - 1])
|
||||
return con[type - 1];
|
||||
|
||||
long const prio = (RTTHREADTYPE_END - type) *
|
||||
(Cpu_session::PRIORITY_LIMIT / RTTHREADTYPE_END);
|
||||
unsigned const VIRTUAL_GENODE_VBOX_LEVELS = 16;
|
||||
static_assert (RTTHREADTYPE_END < VIRTUAL_GENODE_VBOX_LEVELS,
|
||||
"prio levels exceeds VIRTUAL_GENODE_VBOX_LEVELS");
|
||||
|
||||
long const prio = (VIRTUAL_GENODE_VBOX_LEVELS - type) *
|
||||
Cpu_session::PRIORITY_LIMIT / VIRTUAL_GENODE_VBOX_LEVELS;
|
||||
|
||||
char * data = new (env()->heap()) char[16];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user