mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 10:01:57 +00:00
parent
99db9e5246
commit
6974abcf41
@ -928,13 +928,17 @@ void Thread::_call_run_vm()
|
||||
void Thread::_call_pause_vm()
|
||||
{
|
||||
/* check permissions */
|
||||
assert(_core());
|
||||
|
||||
/* get targeted vm via its id */
|
||||
if (!_core()) {
|
||||
PWRN("not entitled to pause virtual machine");
|
||||
return;
|
||||
}
|
||||
/* lookup virtual machine */
|
||||
Vm * const vm = Vm::pool()->object(user_arg_1());
|
||||
assert(vm);
|
||||
|
||||
/* pause targeted vm */
|
||||
if (!vm) {
|
||||
PWRN("failed to lookup virtual machine");
|
||||
return;
|
||||
}
|
||||
/* pause virtual machine */
|
||||
vm->pause();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user