net: config: fix checking for protocols being ready
With current design there is single semaphore (called 'waiter') for wakeing up initialization thread. This thread should then check for number of protocols that still need to be initialized. This happens now only when waiting on 'waiter' semaphore times out. Do not check for k_sem_take(&waiter) return value, as all needed information about protocols being initialized already is in 'counter' semaphore. Fixes: #25358 Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
This commit is contained in:
parent
f74bea04aa
commit
d241c19b0f
1 changed files with 4 additions and 4 deletions
|
@ -402,10 +402,10 @@ int net_config_init(const char *app_info, uint32_t flags, int32_t timeout)
|
||||||
* to wait multiple events, sleep smaller amounts of data.
|
* to wait multiple events, sleep smaller amounts of data.
|
||||||
*/
|
*/
|
||||||
while (count--) {
|
while (count--) {
|
||||||
if (k_sem_take(&waiter, K_MSEC(loop))) {
|
k_sem_take(&waiter, K_MSEC(loop));
|
||||||
if (!k_sem_count_get(&counter)) {
|
|
||||||
break;
|
if (!k_sem_count_get(&counter)) {
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue