lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] Q: implementation for select()


From: Sebastian Bauer
Subject: [lwip-users] Re: [lwip] Q: implementation for select()
Date: Wed, 08 Jan 2003 23:37:29 -0000

Hi!

From: "Duncan Palmer" <address@hidden>
>Add 2 lists of semaphores to each struct netconn - one to be used by
>readfds
>and one by writefds. Add fields to the struct netconn's to enable FD_SET
>and
>friends to be implemented.
[...]
>To implement readfd's: The select call will create a new semaphore and add
>it
>to the list of semaphores on all connections which correspond to its list
>of
>readfds. It will then wait on this semaphore. When new data comes in (i.e.
>in
>all the places where conn->recvmbox is posted to), signal all read
>semaphores
>on the connection. This will wake up the select call which can delete the
>semaphore from all connections it was waiting from and return.

I'm not really familiar with the internals of lwip but this sounds well for
me. The only problem I see is that how select() knows now (after it has been
waken up) which netconn's received something? Or is it possible to check
this? (checking if there is anything in conn->recvmbox without fetching).

Also is there really the need that the netconn's should have lists? Maybe
just a refrence would be enough. I think only one task/process/thread can
receive something from a netconn.
That would make the implementation simpler.

But I will think a little bit more about tomorrow :)

Ciao,
Sebastian



[This message was sent through the lwip discussion list.]




reply via email to

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