diff --git a/src/network/net_pcap.c b/src/network/net_pcap.c index f1bf76271..cef7bbe8b 100644 --- a/src/network/net_pcap.c +++ b/src/network/net_pcap.c @@ -253,6 +253,8 @@ network_pcap_setup(uint8_t *mac, NETRXCB func, void *arg) pclog(" Starting thread..\n"); poll_tid = thread_create(poll_thread, mac); + thread_started = thread_create_event(); + thread_wait_event((event_t *) thread_started, -1); return(0); diff --git a/src/network/net_slirp.c b/src/network/net_slirp.c index a72fe7180..ed19a9e4e 100644 --- a/src/network/net_slirp.c +++ b/src/network/net_slirp.c @@ -150,6 +150,8 @@ network_slirp_setup(uint8_t *mac, NETRXCB func, void *arg) pclog("SLiRP: starting thread..\n"); poll_tid = thread_create(poll_thread, mac); + thread_start = thread_create_event(); + thread_wait_event((event_t *) thread_started, -1); return(0);