mixer_gui_qt: use Blockade

Issue #3803
This commit is contained in:
Alexander Boettcher 2020-07-06 11:48:30 +02:00 committed by Norman Feske
parent f946de4450
commit ad284491e6
3 changed files with 5 additions and 6 deletions

View File

@ -41,17 +41,17 @@ struct Report_handler
Genode::Entrypoint sig_ep;
Genode::Signal_handler<Report_handler> channels_handler;
Genode::Lock _report_lock { Genode::Lock::LOCKED };
Genode::Blockade _report_blockade { };
bool window_connected { false };
void _report(char const *data, size_t size)
{
Genode::Xml_node node(data, size);
proxy->report_changed(&_report_lock, &node);
proxy->report_changed(&_report_blockade, &node);
/* wait until the report was handled */
_report_lock.lock();
_report_blockade.block();
}
void _handle_channels()

View File

@ -421,13 +421,13 @@ void Main_window::_update_clients(Genode::Xml_node &channels)
*/
void Main_window::report_changed(void *l, void const *p)
{
Genode::Lock &lock = *reinterpret_cast<Genode::Lock*>(l);
Genode::Blockade &blockade = *reinterpret_cast<Genode::Blockade*>(l);
Genode::Xml_node &node = *((Genode::Xml_node*)p);
if (node.has_type("channel_list"))
_update_clients(node);
lock.unlock();
blockade.wakeup();
}

View File

@ -16,7 +16,6 @@
/* Genode includes */
#include <base/env.h>
#include <base/lock.h>
#include <util/xml_node.h>
/* Qt includes */