Re: libfetch kqueue patch

2001-11-28 Thread Maxim Sobolev
Garrett Wollman wrote: > > < >said: > > > As from OpenBSD (in shorter form): > > > fd_set *fds = calloc(howmany(fd+1, NFDBITS), sizeof(fd_mask)); > > But this is not portable. The application is not allowed to assume > anything about the structure of an fd_set, or the existence of a ty

Re: libfetch kqueue patch

2001-11-26 Thread Garrett Wollman
< said: > As from OpenBSD (in shorter form): > fd_set *fds = calloc(howmany(fd+1, NFDBITS), sizeof(fd_mask)); But this is not portable. The application is not allowed to assume anything about the structure of an fd_set, or the existence of a type `fd_mask', or the existence of a macro `h

Re: libfetch kqueue patch

2001-11-26 Thread Andrew R. Reiter
As from OpenBSD (in shorter form): fd_set *fds = calloc(howmany(fd+1, NFDBITS), sizeof(fd_mask)); FD_SET(fd, fds); select(fd+1, fds...); As for being "portable", the only thing I've seen that is nice and neat is libevent from Niels Provos, but I think some people had "is

Re: libfetch kqueue patch

2001-11-26 Thread David Malone
On Mon, Nov 26, 2001 at 03:04:56PM -0500, Andrew R. Reiter wrote: > Agreed, or people could code with select in a nice manner and dynamically > allocate the fd_set arrays. Is there a portable way to allocate dynamically sized fd_sets? It could easily be one of those things that you're not suppose

Re: libfetch kqueue patch

2001-11-26 Thread Andrew R. Reiter
Agreed, or people could code with select in a nice manner and dynamically allocate the fd_set arrays. On Mon, 26 Nov 2001, Garrett Wollman wrote: :< said: : :> For what it's worth, it also makes code less portable. : :On the other hand, it would also make libfetch useful in a larger :variety of

Re: libfetch kqueue patch

2001-11-26 Thread Garrett Wollman
< said: > For what it's worth, it also makes code less portable. On the other hand, it would also make libfetch useful in a larger variety of applications; viz., those which have so many file descriptors open that the one used by libfetch will overflow the default fd_set. -GAWollman To Unsubs

Re: libfetch kqueue patch

2001-11-22 Thread Maxim Sobolev
Dag-Erling Smorgrav wrote: > > David Hill <[EMAIL PROTECTED]> writes: > > This patch converts libfetch to use kqueue instead of select. > > Why? It reduces neither the size nor the complexity of the code, and > does not result in any notable performance improvements. For what it's worth, it al

Re: libfetch kqueue patch

2001-11-22 Thread Dag-Erling Smorgrav
David Hill <[EMAIL PROTECTED]> writes: > This patch converts libfetch to use kqueue instead of select. Why? It reduces neither the size nor the complexity of the code, and does not result in any notable performance improvements. DES -- Dag-Erling Smorgrav - [EMAIL PROTECTED] To Unsubscribe: s

libfetch kqueue patch

2001-11-21 Thread David Hill
Hello - This patch converts libfetch to use kqueue instead of select. Thanks David Hill fetch-common.c.patch Description: Binary data