lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-users] SemSignal gets called on a alreadysignaled semaphore


From: Goldschmidt Simon
Subject: RE: [lwip-users] SemSignal gets called on a alreadysignaled semaphore
Date: Thu, 31 May 2007 14:00:36 +0200

> My port consists of mainly the implementation of sys_arch.c 
> and the interface to the ethernet chip (With a seperate rx 
> task, interrupt driven). After setting up the ethernet chip I 
> do the following operations to init lwip:
> 
>     IP4_ADDR(&gw, 192,168,1,11);
>     IP4_ADDR(&ipaddr, 192,168,1,34);
>     IP4_ADDR(&netmask, 255,255,255,0);
>     
>     sys_init();
>     mem_init();    
>     memp_init();
>     pbuf_init(); 
>     netif_init();
>     tcpip_init(NULL, NULL);
> 
>     netif_add(&nif, &ipaddr, &netmask, &gw, NULL, ethernetif_init,
ip_input);  

ip_input must not be used directly in multithreading environments.
Because the core is not locked, it mustn't be accessed from multiple
threads. Use tcpip_input() (or tcpip_ethinput() for new CVS code)
instead. That makes sure RX frames are processed in tcpip_thread
context, not in the context of the RX thread (or even interrupt
context).

>     netif_set_default(&nif);
>     netif_set_up(&nif);
> 
> Anything missing?

Doesn't seem so.


Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]