mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
decorator: fix cap-upgrade handling
This commit fixes the 'Out_of_caps' handling. The previous version mistakenly upgraded the RAM instead the caps as response. The problem could be triggered by the 'decorator_stress.run' script.
This commit is contained in:
parent
f63713694c
commit
c8322ffd2a
@ -9,6 +9,7 @@ import_from_depot [depot_user]/src/[base_src] \
|
||||
[depot_user]/src/decorator \
|
||||
[depot_user]/src/libc \
|
||||
[depot_user]/src/libpng \
|
||||
[depot_user]/src/vfs \
|
||||
[depot_user]/src/zlib
|
||||
|
||||
install_config {
|
||||
@ -82,8 +83,11 @@ install_config {
|
||||
</route>
|
||||
</start>
|
||||
|
||||
<start name="decorator">
|
||||
<start name="decorator" caps="200">
|
||||
<resource name="RAM" quantum="8M"/>
|
||||
<config>
|
||||
<default-policy/>
|
||||
</config>
|
||||
<route>
|
||||
<service name="ROM" label="pointer">
|
||||
<child name="report_rom" /> </service>
|
||||
|
@ -183,7 +183,7 @@ struct Decorator::Main : Window_factory_base
|
||||
*/
|
||||
Window_base *create(Xml_node window_node) override
|
||||
{
|
||||
for (unsigned retry = 0 ; retry < 2; retry ++) {
|
||||
for (;;) {
|
||||
try {
|
||||
return new (_heap)
|
||||
Window(window_node.attribute_value("id", 0UL),
|
||||
@ -195,7 +195,7 @@ struct Decorator::Main : Window_factory_base
|
||||
}
|
||||
catch (Genode::Out_of_caps) {
|
||||
Genode::log("Handle Out_of_caps of nitpicker session - upgrade by 2");
|
||||
_nitpicker.upgrade_ram(2);
|
||||
_nitpicker.upgrade_caps(2);
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user