[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] arp question
From: |
Leon Woestenberg |
Subject: |
Re: [lwip-users] arp question |
Date: |
Sun, 28 Nov 2004 17:57:23 +0100 |
User-agent: |
Mozilla Thunderbird 0.7.1 (Windows/20040626) |
Hello Jim,
forgot to answer the part on concurrency protection.
Jim Gibbons wrote:
I agree that it is a simple matter to get etharp_output and the timer
to run out of the tcpip task. I think it is substantially harder to
get etharp_ip_input and etharp_arp_input to run in that context. Most
of us who implement netif's in multitasking environments end up with
an ethernet receive thread from which the etharp input functions must
be called. Other brave souls do this from an interrupt context. In
the former case, a mutex would provide the protection required, while
in the latter case SYS_LIGHTWEIGHT_PROT methods might be used to
protect the timer and output.
There are too many multitasking environments around to cope for. We hope
the integrating developer has knowledge about
the multithreading issues involved for her environment. We came across a
bunch when we merged lwIP into uCOS, such
as mutex-recursion, priority inheritance, nested interrupts.
Personally, I think the synchronization primitives in the outer API
wrapper of lwIP are inadequately generic, but I also think
there is no such thing as a generic locking abstraction that works for
everyone. POSIX would be great but is probably an
overkill in the context of lwIP.
Regards,
Leon.