[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #27996] Thread-safety of tcp_timer_needed()
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [bug #27996] Thread-safety of tcp_timer_needed() |
Date: |
Wed, 11 Nov 2009 15:58:36 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 |
Update of bug #27996 (project lwip):
Status: None => Invalid
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #5:
> You say, that if it is called from a different thread that's the bug.
> So is it wrong to call ethernet_input() from the separate ethernetif
thread?
Yes, in two ways:
1) ethernet_input() (as any other function from the core files - except for
some pbuf/mem/memp functions) must not be called from any other thread than
the tcpip_thread
2) the port should not call ethernet_input() but instead initialize the netif
correctly with the netif_add() call, set the flag NETIF_FLAG_ETHARP in its
_init() function (see example ethernetif.c) and then call netif->input()
instead of ethernet_input() (also, see example ethernetif.c), which takes care
of getting into the correct thread and caling ethernet_input().
As you see, the example ethernetif.c would have been a good guidance :-)
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?27996>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/