diff --git a/repos/dde_linux/src/drivers/usb/spec/x86/pci_driver.cc b/repos/dde_linux/src/drivers/usb/spec/x86/pci_driver.cc
index b837dd7b48..634e07d463 100644
--- a/repos/dde_linux/src/drivers/usb/spec/x86/pci_driver.cc
+++ b/repos/dde_linux/src/drivers/usb/spec/x86/pci_driver.cc
@@ -14,7 +14,6 @@
/* Genode includes */
#include
#include
-#include
#include
#include
diff --git a/repos/dde_linux/src/drivers/usb_host/spec/x86/platform.cc b/repos/dde_linux/src/drivers/usb_host/spec/x86/platform.cc
index ae8acb21a4..e9b2480fe5 100644
--- a/repos/dde_linux/src/drivers/usb_host/spec/x86/platform.cc
+++ b/repos/dde_linux/src/drivers/usb_host/spec/x86/platform.cc
@@ -14,7 +14,6 @@
/* Genode includes */
#include
#include
-#include
#include
#include
#include
diff --git a/repos/dde_linux/src/drivers/wifi/frontend.h b/repos/dde_linux/src/drivers/wifi/frontend.h
index c4721fd6d8..b238ffd19d 100644
--- a/repos/dde_linux/src/drivers/wifi/frontend.h
+++ b/repos/dde_linux/src/drivers/wifi/frontend.h
@@ -330,10 +330,10 @@ struct Wifi::Frontend
Msg_buffer _msg;
- Genode::Lock _notify_lock { Genode::Lock::UNLOCKED };
+ Genode::Blockade _notify_blockade { };
- void _notify_lock_lock() { _notify_lock.lock(); }
- void _notify_lock_unlock() { _notify_lock.unlock(); }
+ void _notify_lock_lock() { _notify_blockade.block(); }
+ void _notify_lock_unlock() { _notify_blockade.wakeup(); }
bool _rfkilled { false };
@@ -1568,6 +1568,9 @@ struct Wifi::Frontend
_config_rom.sigh(_config_sigh);
_scan_timer.sigh(_scan_timer_sigh);
+ /* set/initialize as unblocked */
+ _notify_blockade.wakeup();
+
try {
_ap_reporter.construct(env, "accesspoints", "accesspoints");
_ap_reporter->generate([&] (Genode::Xml_generator &xml) { });
diff --git a/repos/dde_linux/src/drivers/wifi/main.cc b/repos/dde_linux/src/drivers/wifi/main.cc
index da4287020c..9182d6f259 100644
--- a/repos/dde_linux/src/drivers/wifi/main.cc
+++ b/repos/dde_linux/src/drivers/wifi/main.cc
@@ -93,7 +93,8 @@ void *wifi_get_buffer(void)
/* exported by wifi.lib.so */
-extern void wifi_init(Genode::Env&, Genode::Lock&, bool, Genode::Signal_context_capability);
+extern void wifi_init(Genode::Env&, Genode::Blockade&, bool,
+ Genode::Signal_context_capability);
struct Main
@@ -103,21 +104,21 @@ struct Main
Genode::Constructible _wpa;
Genode::Constructible _frontend;
- Genode::Lock _wpa_startup_lock { Genode::Lock::LOCKED };
+ Genode::Blockade _wpa_startup_blockade { };
Main(Genode::Env &env) : env(env)
{
_frontend.construct(env);
_wifi_frontend = &*_frontend;
- _wpa.construct(env, _wpa_startup_lock);
+ _wpa.construct(env, _wpa_startup_blockade);
/*
* Forcefully disable 11n but for convenience the attribute is used the
* other way araound.
*/
bool const disable_11n = !_frontend->use_11n();
- wifi_init(env, _wpa_startup_lock, disable_11n,
+ wifi_init(env, _wpa_startup_blockade, disable_11n,
_frontend->rfkill_sigh());
}
};
diff --git a/repos/dde_linux/src/drivers/wifi/wpa.cc b/repos/dde_linux/src/drivers/wifi/wpa.cc
index 1d986045f4..61c342281d 100644
--- a/repos/dde_linux/src/drivers/wifi/wpa.cc
+++ b/repos/dde_linux/src/drivers/wifi/wpa.cc
@@ -13,8 +13,8 @@
*/
/* Genode includes */
+#include
#include
-#include
#include
/* libc includes */
@@ -40,14 +40,14 @@ void * Wpa_thread::_entry_trampoline(void *arg)
void Wpa_thread::_entry()
{
/* wait until the wifi driver is up and running */
- _lock.lock();
+ _blockade.block();
_exit = wpa_main();
Genode::sleep_forever();
}
-Wpa_thread::Wpa_thread(Genode::Env &env, Genode::Lock &lock)
-: _lock(lock), _exit(-1)
+Wpa_thread::Wpa_thread(Genode::Env &env, Genode::Blockade &blockade)
+: _blockade(blockade), _exit(-1)
{
pthread_t tid = 0;
if (pthread_create(&tid, 0, _entry_trampoline, this) != 0) {
diff --git a/repos/dde_linux/src/drivers/wifi/wpa.h b/repos/dde_linux/src/drivers/wifi/wpa.h
index 476d0335a0..3a124cc142 100644
--- a/repos/dde_linux/src/drivers/wifi/wpa.h
+++ b/repos/dde_linux/src/drivers/wifi/wpa.h
@@ -17,15 +17,15 @@
namespace Genode {
struct Env;
- struct Lock;
+ struct Blockade;
}
class Wpa_thread
{
private:
- Genode::Lock &_lock;
- int _exit;
+ Genode::Blockade &_blockade;
+ int _exit;
static void * _entry_trampoline(void *arg);
@@ -33,7 +33,7 @@ class Wpa_thread
public:
- Wpa_thread(Genode::Env &env, Genode::Lock &lock);
+ Wpa_thread(Genode::Env &, Genode::Blockade &);
};
#endif /* _WIFI__WPA_H_ */
diff --git a/repos/dde_linux/src/lib/wifi/init.cc b/repos/dde_linux/src/lib/wifi/init.cc
index 1cc4500e80..8113e4b8f0 100644
--- a/repos/dde_linux/src/lib/wifi/init.cc
+++ b/repos/dde_linux/src/lib/wifi/init.cc
@@ -13,7 +13,7 @@
/* Genode includes */
#include
-#include
+#include
/* local includes */
#include
@@ -113,7 +113,7 @@ struct net init_net;
LIST_HEAD(net_namespace_list);
-static Genode::Lock *_wpa_lock;
+static Genode::Blockade *_wpa_blockade;
static void run_linux(void *args)
@@ -146,7 +146,7 @@ static void run_linux(void *args)
Genode::sleep_forever();
}
- _wpa_lock->unlock();
+ _wpa_blockade->wakeup();
_lx_init_done = true;
@@ -180,7 +180,7 @@ static void run_linux(void *args)
unsigned long jiffies;
-void wifi_init(Genode::Env &env, Genode::Lock &lock, bool disable_11n,
+void wifi_init(Genode::Env &env, Genode::Blockade &blockade, bool disable_11n,
Genode::Signal_context_capability rfkill)
{
Lx_kit::construct_env(env);
@@ -194,7 +194,7 @@ void wifi_init(Genode::Env &env, Genode::Lock &lock, bool disable_11n,
LX_MUTEX_INIT(rfkill_global_mutex);
LX_MUTEX_INIT(rtnl_mutex);
- _wpa_lock = &lock;
+ _wpa_blockade = &blockade;
INIT_LIST_HEAD(&init_net.dev_base_head);
/* add init_net namespace to namespace list */
diff --git a/repos/dde_linux/src/lx_kit/scheduler.cc b/repos/dde_linux/src/lx_kit/scheduler.cc
index e8ae8f3cea..8205364f35 100644
--- a/repos/dde_linux/src/lx_kit/scheduler.cc
+++ b/repos/dde_linux/src/lx_kit/scheduler.cc
@@ -15,7 +15,6 @@
/* Genode includes */
#include
-#include
#include
#include
#include
@@ -39,7 +38,6 @@ class Lx_kit::Scheduler : public Lx::Scheduler
bool verbose = false;
Lx_kit::List _present_list;
- Genode::Lock _present_list_mutex;
Lx::Task *_current = nullptr; /* currently scheduled task */