lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip_select call


From: David Haas
Subject: Re: [lwip-users] lwip_select call
Date: Tue, 13 Apr 2004 08:50:02 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113

The application task is pending on the sys_sem_wait call. The tcp task will get in more data and call the event_callback(). event_callback() first increments or decrements the appropriate event counter in the socket and then later goes through the select_cb_list which has an entry for each task pending on a socket. It calls sys_sem_signal() for any tasks waiting for that socket.

So the application task waits, but the tcp task signals.

David.


address@hidden wrote:


Hi,

In lwip_select call, if the data at receive side is not ready, it calls sys_sem_wait_timeout() on the select_scb.sem, which can only be signaled at event_callback() when the bit for the socket is set. Now if at the time the lwip_select is called and no data is ready, the bit for that socket will not be set at lwip_selscan(), so the question now is: who is going to set the bit for that socket when the data is ready? Is that socket waiting for another socket to call lwip_select() to get its bit updated in the readset and to get back from the wait state? What if this is the only select call? Anyone could answer this puzzle for me would be greatly appreciated. Thanks in advance.

Shawn

------------------------------------------------------------------------

_______________________________________________
lwip-users mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/lwip-users





reply via email to

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