-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wait for Wi-Fi management to start up (#8834) #9322
Conversation
@tewarid @andy31415 I'm a little confused by the changes here. We're sleeping and waiting for some state to change... does it get changed by some other thread? If so, where is the synchronization with the other thread? Or are we just touching members from multiple threads without any synchronization? |
@bzbarsky-apple Async DBUS wpa_supplicant proxy initialization in ConnectivityMgrImpl is the source for parallelism - see sequenced calls to wpa_fi_w1_wpa_supplicant1_proxy_new_for_bus, wpa_fi_w1_wpa_supplicant1_call_get_interface, and wpa_fi_w1_wpa_supplicant1_interface_proxy_new_for_bus in src/platform/Linux/ConnectivityManagerImpl.cpp. During program initialization, the only thread changing state is the one on which DBUS callback happens. I don't see why lack of synchronization should lead to non determinism. Async init is perhaps overkill, in hindsight. |
@bzbarsky-apple Although synchronization may not be necessary, state in GDBusWpaSupplicant (src/platform/Linux/ConnectivityManagerImpl.h) should be declared volatile. |
@tewarid Yes, but if it's doing unsynchronized writes and this thread is doing unsynchronized reads, then depending on the exact size of What we should probably do is just have that |
…ip#9322) * Wait for Wi-Fi management to start up (project-chip#8834) * Restyled by clang-format * Extract code in function EnsureWifiIsStarted * Restyled by whitespace * Fix unused variable warning/error Co-authored-by: Restyled.io <[email protected]>
Problem
What is being fixed?
Change overview
Poll for Wi-Fi Management to start for five attempts every 100 ms.
Testing
How was this tested?