mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
parent
ea294fff0c
commit
8264b63e0b
@ -35,6 +35,8 @@ Thread_capability Cpu_session_component::create_thread(Capability<Pd_session> pd
|
||||
|
||||
withdraw(Ram_quota{_utcb_quota_size()});
|
||||
|
||||
try {
|
||||
|
||||
Cpu_thread_component *thread = 0;
|
||||
|
||||
if (weight.value == 0) {
|
||||
@ -85,6 +87,11 @@ Thread_capability Cpu_session_component::create_thread(Capability<Pd_session> pd
|
||||
_thread_list.insert(thread);
|
||||
|
||||
return thread->cap();
|
||||
|
||||
} catch (...) {
|
||||
replenish(Ram_quota{_utcb_quota_size()});
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user