[Top][All Lists]

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

Re: [lwip-users] TCP tmr endless loop

From: Erik Ekman
Subject: Re: [lwip-users] TCP tmr endless loop
Date: Wed, 24 Oct 2007 13:37:07 +0200

On 10/24/07, Jonathan Larmour <address@hidden> wrote:
> Kieran Mansley wrote:
> > On Wed, 2007-10-24 at 13:11 +0200, Erik Ekman wrote:
> >
> >
> >>The problem is that sometimes it gets stuck in the tcp_slowtmr and
> >>tcp_fasttmr, just like described earlier in the list. The
> >>tcp_active_pcb has a pointer next which points to itself.
> >
> >
> > That sort of list corruption very much points to two threads being
> > active in the core of lwIP at the same time.
> Specifically your lwip_tick() and signal_send() functions are probably
> being called overlapping each other, and each is making its own calls into
> lwIP.
> Jifl

I see. But my OS does not allow multiple tasks running at the same
time. The "scheduler" is simply a loop through all registered tasks,
and it calls the function for each task that has a message waiting.
The next task will then be called when the first has returned. The
receive packet interrupt allocates a message in constant time and
sends the message to lwip_tick. The timer also just puts messages in
the task queues, so it will not interrupt the execution.

The system only uses cooperative multitasking and some interrupts, and
if I need to add an RTOS for some reason, the existing OS can be run
as a thread in it.

I will investigate some more, thanks for the hints.


reply via email to

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