lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] pbuf.c issues


From: Leon Woestenberg
Subject: Re: [lwip-devel] pbuf.c issues
Date: Sat, 22 Apr 2006 18:58:23 +0200
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

Hi all,

Christiaan Simons wrote:
Hi,

* Can anyone explain the idea behind the
double locking in pbuf_pool_alloc() ??

I see both SYS_ARCH_PROTECT() macro's
and some pbuf.c local flags like pbuf_pool_alloc_lock
and pbuf_pool_free_lock.

I figured the pbuf.c local flags are only used
when SYS_LIGHTWEIGHT_PROT == 0,
The thing I remember is that SYS_LIGHTWEIGHT_PROT was introduced to make an Ethernet driver interrupt handler able to pbuf_pool_alloc() pbufs for incoming traffic, in a single threaded system (i.e. a non-blocking mutex approach between interrupt code and application code).

I have run a "cvs blame" or rather "cvs annotate" on the code and the pbuf_pool_alloc_* stuff seems to be from David Haas, but I am not sure if
he implemented it or only touched-up the code.

It goes back to 2003-02. The mailing list might help:

http://lists.gnu.org/archive/html/lwip-members/2003-02/index.html

Regards,

Leon.






reply via email to

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