Start receiver thread in LwIP after initialization
Otherwise the receiver thread might access variables not initialized properly, and thereby raising pagefaults. Fixes #802
This commit is contained in:
parent
03538a1c3b
commit
76d449ebe6
|
@ -263,7 +263,6 @@ extern "C" {
|
||||||
/* Setup receiver thread */
|
/* Setup receiver thread */
|
||||||
Nic_receiver_thread *th = new (env()->heap())
|
Nic_receiver_thread *th = new (env()->heap())
|
||||||
Nic_receiver_thread(nic, netif);
|
Nic_receiver_thread(nic, netif);
|
||||||
th->start();
|
|
||||||
|
|
||||||
/* Store receiver thread address in user-defined netif struct part */
|
/* Store receiver thread address in user-defined netif struct part */
|
||||||
netif->state = (void*) th;
|
netif->state = (void*) th;
|
||||||
|
@ -285,6 +284,8 @@ extern "C" {
|
||||||
for(int i=0; i<6; ++i)
|
for(int i=0; i<6; ++i)
|
||||||
netif->hwaddr[i] = _mac.addr[i];
|
netif->hwaddr[i] = _mac.addr[i];
|
||||||
|
|
||||||
|
th->start();
|
||||||
|
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user