diff --git a/repos/ports/src/virtualbox5/frontend/console.cc b/repos/ports/src/virtualbox5/frontend/console.cc
index 2344f15fa..23a01de29 100644
--- a/repos/ports/src/virtualbox5/frontend/console.cc
+++ b/repos/ports/src/virtualbox5/frontend/console.cc
@@ -12,6 +12,7 @@
*/
#include
+#include
#include
#include
@@ -123,7 +124,7 @@ void GenodeConsole::update_video_mode()
32);
}
-void GenodeConsole::handle_input()
+void GenodeConsole::_handle_input()
{
/* disable input processing if vm is powered down */
if (vm_down && (_vbox_mouse || _vbox_keyboard)) {
@@ -273,7 +274,7 @@ void GenodeConsole::handle_input()
RTTimeMilliTS());
}
-void GenodeConsole::handle_mode_change()
+void GenodeConsole::_handle_mode_change()
{
IFramebuffer *pFramebuffer = NULL;
HRESULT rc = i_getDisplay()->QueryFramebuffer(0, &pFramebuffer);
@@ -312,7 +313,7 @@ void GenodeConsole::init_clipboard()
}
}
-void GenodeConsole::handle_cb_rom_change()
+void GenodeConsole::_handle_cb_rom_change()
{
if (!_clipboard_rom)
return;
@@ -332,7 +333,7 @@ void GenodeConsole::init_backends(IKeyboard * gKeyboard, IMouse * gMouse)
_nitpicker.mode_sigh(_mode_change_signal_dispatcher);
- handle_mode_change();
+ _handle_mode_change();
}
void GenodeConsole::i_onMouseCapabilityChange(BOOL supportsAbsolute,
@@ -518,7 +519,7 @@ void fireKeyboardLedsChangedEvent(IEventSource *, bool num_lock,
guest_caps_lock = caps_lock;
}
-void GenodeConsole::handle_sticky_keys()
+void GenodeConsole::_handle_sticky_keys()
{
/* no keyboard - no sticky key handling */
if (!_vbox_keyboard || !_caps_lock.constructed())
@@ -553,3 +554,15 @@ void GenodeConsole::handle_sticky_keys()
_vbox_keyboard->PutScancode(Input::KEY_CAPSLOCK | 0x80);
}
}
+
+void GenodeConsole::handle_input() {
+ Libc::with_libc([&] () { _handle_input(); }); }
+
+void GenodeConsole::handle_sticky_keys() {
+ Libc::with_libc([&] () { _handle_sticky_keys(); }); }
+
+void GenodeConsole::handle_mode_change() {
+ Libc::with_libc([&] () { _handle_mode_change(); }); }
+
+void GenodeConsole::handle_cb_rom_change() {
+ Libc::with_libc([&] () { _handle_cb_rom_change(); }); }
diff --git a/repos/ports/src/virtualbox5/frontend/console.h b/repos/ports/src/virtualbox5/frontend/console.h
index a8e5917b8..ddcbcca92 100644
--- a/repos/ports/src/virtualbox5/frontend/console.h
+++ b/repos/ports/src/virtualbox5/frontend/console.h
@@ -140,6 +140,11 @@ class GenodeConsole : public Console {
|| keycode == Input::BTN_MIDDLE;
}
+ void _handle_input();
+ void _handle_mode_change();
+ void _handle_cb_rom_change();
+ void _handle_sticky_keys();
+
public:
GenodeConsole()
diff --git a/repos/ports/src/virtualbox5/generic/sup_vmm.cc b/repos/ports/src/virtualbox5/generic/sup_vmm.cc
index 703b885ff..dfe9d8d05 100644
--- a/repos/ports/src/virtualbox5/generic/sup_vmm.cc
+++ b/repos/ports/src/virtualbox5/generic/sup_vmm.cc
@@ -1154,8 +1154,10 @@ class Periodic_gip
ASMAtomicIncU32(&cpu->u32TransactionId);
/* call the timer function of the RTTimerCreate call */
- if (rttimer_func)
- rttimer_func(nullptr, rttimer_obj, 0);
+ if (rttimer_func) {
+ Libc::with_libc([&] () {
+ rttimer_func(nullptr, rttimer_obj, 0); });
+ }
for (Vcpu_handler *vcpu_handler = vcpu_handler_list().first();
vcpu_handler;
diff --git a/repos/ports/src/virtualbox5/network.cpp b/repos/ports/src/virtualbox5/network.cpp
index 8d6cc2d3c..f743e6410 100644
--- a/repos/ports/src/virtualbox5/network.cpp
+++ b/repos/ports/src/virtualbox5/network.cpp
@@ -45,6 +45,7 @@
/* VBox Genode specific */
#include "vmm.h"
+#include
/*******************************************************************************
* Structures and Typedefs *
@@ -121,12 +122,13 @@ class Nic_client
char *rx_content = _nic.rx()->packet_content(rx_packet);
- int rc = _down_rx->pfnWaitReceiveAvail(_down_rx, RT_INDEFINITE_WAIT);
- if (RT_FAILURE(rc))
- continue;
+ Libc::with_libc([&] () {
+ int rc = _down_rx->pfnWaitReceiveAvail(_down_rx, RT_INDEFINITE_WAIT);
+ if (RT_FAILURE(rc)) return;
- rc = _down_rx->pfnReceive(_down_rx, rx_content, rx_packet.size());
- AssertRC(rc);
+ rc = _down_rx->pfnReceive(_down_rx, rx_content, rx_packet.size());
+ AssertRC(rc);
+ });
_nic.rx()->acknowledge_packet(rx_packet);
}
@@ -138,9 +140,11 @@ class Nic_client
{
_link_up = _nic.link_state();
- _down_rx_config->pfnSetLinkState(_down_rx_config,
- _link_up ? PDMNETWORKLINKSTATE_UP
- : PDMNETWORKLINKSTATE_DOWN);
+ Libc::with_libc([&] () {
+ _down_rx_config->pfnSetLinkState(_down_rx_config,
+ _link_up ? PDMNETWORKLINKSTATE_UP
+ : PDMNETWORKLINKSTATE_DOWN);
+ });
}
void _handle_destruct()