[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] The sockets interface, select()
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] The sockets interface, select() |
Date: |
Tue, 20 Sep 2011 14:24:12 +0100 |
On Mon, 2011-09-19 at 10:31 +0300, Matias Mandell wrote:
> In the end of event_callback() when it has gone thru all tasks waiting
> for a select() it unprotects&protects and starts over from the
> beginning. At this point the sock->select_waiting was sometimes zero and
> the loop crashed.
>
>
> In lwip_select() there are protections when adding/removing from list
> and increasing/decreasing sock->select_waiting counters but they are not
> in sync. How good idea is it to pass a local variable to another task,
> there might be context switching in between? I might have a stack
> overflow or something going on...
Without looking at the code I'm not quite sure what the problem is. Do
you have a patch to fix it as that would show clearly what you're
describing.
Thanks
Kieran