[riot-notifications] [RIOT-OS/RIOT] sys/net/gnrc/netif: make gnrc_netif_create() blocking to avoid race condition (#16527)

Martine Lenders notifications at github.com
Tue Jun 15 15:34:30 CEST 2021

@miri64 commented on this pull request.

> @@ -83,6 +87,10 @@ int gnrc_netif_create(gnrc_netif_t *netif, char *stack, int stacksize,
     res = thread_create(stack, stacksize, priority, THREAD_CREATE_STACKTEST,
                         _gnrc_netif_thread, (void *)netif, name);
+    /* wait for result of driver init */
+    mutex_lock(&_netif_init_done);

I am wondering if we can re-use the `netif`'s own mutex (locked with `gnrc_netif_acquire()` for that?

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210615/367fc968/attachment-0001.htm>

More information about the notifications mailing list