lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Bug in pbuf.c regarding PBUF_POOL


From: Timmy Brolin
Subject: Re: [lwip-users] Bug in pbuf.c regarding PBUF_POOL
Date: Tue, 05 Dec 2006 23:20:07 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)

Jonathan Larmour wrote:

Leon Woestenberg wrote:

Separately, there's the issue that the !SYS_LIGHTWEIGHT_PROT code is broken. Someone interested in that code (Christian?) may want to take that up.

I think it the raw (core) API level is not broken. Also, the core is
intentionally designed to be void of any locking mechanisms.

Go back to the start of this thread: pbuf_pool_free_lock is never changed, and pbuf_pool_free_sem is only used by PBUF_POOL_FREE and nowhere else. There is therefore no protection between allocs and frees.

Is it the consensus that lwip at the moment is not thread safe with !SYS_LIGHTWEIGHT_PROT, but it is thread safe to some degree with SYS_LIGHTWEIGHT_PROT? Looking at the code, the !SYS_LIGHTWEIGHT_PROT parts of pbuf_pool_free and alloc seems to be very broken, with some kind of locks which clearly does not work.

Can I find some kind of documentation somewhere on which lwip functions are thread safe and which are not?

Regards,
Timmy Brolin




reply via email to

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