lwip-users
[Top][All Lists]
Advanced

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

Re: AW: [lwip-users] Assertion : "tcp_enqueue: no pbufs onqueue=>bothque


From: Mumtaz Ahmad
Subject: Re: AW: [lwip-users] Assertion : "tcp_enqueue: no pbufs onqueue=>bothqueues empty"
Date: Tue, 31 Oct 2006 17:41:59 +0500

Simple method to make it thread safe is to protect all the stack enteries by
a mutex  so that any thread trying to call any function of stack must
acquire this mutex first to get in.



----- Original Message ----- 
From: "Amir Bukhari" <address@hidden>
To: "Mailing list for lwIP users" <address@hidden>
Sent: Tuesday, October 31, 2006 5:29 PM
Subject: AW: AW: [lwip-users] Assertion : "tcp_enqueue: no pbufs
onqueue=>bothqueues empty"


> I am not familiar with lwip internal, what I can do here. Which part I
should make it thread safe (not necessary all parts).
> I want to a void a deadlock when doing thread safe. In my example when one
of the task access lwip part it should not wait for an event as this will
case the others task to wait.
>
> When I use socket API! All commutations goes throw messages which in this
case call my OS layer and that part is thread safe. tcp_enqueue() get called
from different parts, but whether it got called from my  2 task I suspect!!
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: address@hidden
[mailto:address@hidden Im Auftrag von
Kieran Mansley
> Gesendet: Dienstag, 31. Oktober 2006 12:29
> An: Mailing list for lwIP users
> Betreff: Re: AW: [lwip-users] Assertion : "tcp_enqueue: no pbufs on
queue=>bothqueues empty"
>
> On Tue, 2006-10-31 at 12:23 +0100, Amir Bukhari wrote:
> > Yes, I have 2 real time task which access the same connection, but one
only sends and the second task read and send data.
> >
> > This case should not case an assertion, its application problem to
handle such case, but TCP/IP stack should not be affected with such or I am
wrong
> >
> > What can happened if both queue is embty, does lwip will crash?
>
> Your port of lwIP should ensure that there is only one thread in the
> lwIP core code at any one time.  lwIP is not thread safe I'm afraid.
> The consequences of having two threads concurrently active in the stack
> are many and varied, but all bad.
>
> Kieran
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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