search for: fds_size

Displaying 4 results from an estimated 4 matches for "fds_size".

2005 Dec 14
2
Patch: ioloop using kqueue/kevent for FreeBSD
...OP_KQUEUE + +#include <sys/types.h> +#include <sys/event.h> +#include <sys/time.h> + +#ifndef INITIAL_BUF_SIZE +# define INITIAL_BUF_SIZE 128 +#endif + + +struct ioloop_handler_context { + int kq; + size_t evbuf_size; + struct kevent *evbuf; + + size_t fds_size; + struct fdrecord *fds; +}; + +struct fdrecord { + /* IO_READ | IO_WRITE | IO_ERROR */ + unsigned char mode : 3; +}; + + +void io_loop_handler_init(struct ioloop *ioloop) +{ + struct ioloop_handler_context *ctx; + + ioloop->handler_context = ctx = +...
2005 Dec 15
2
Patch: More of kqueue() support.
...F, 0, 0, NULL}; - enum io_condition condition = io->condition; + struct kevent ev = { fd, 0, EV_ADD | EV_EOF, 0, 0, NULL }; + enum io_condition condition = io->condition & MASK; /* grow ctx->fds array if necessary */ if ((size_t)fd >= ctx->fds_size) { @@ -103,10 +107,10 @@ void io_loop_handle_add(struct ioloop *i void io_loop_handle_remove(struct ioloop *ioloop, struct io *io) { struct ioloop_handler_context *ctx = ioloop->handler_context; + const int fd = io->fd; struct kevent ev = { fd, 0, EV_DELETE, 0, 0, N...
2006 May 09
2
Fix for the kevent "Unrecognized event" problem.
The attached patch should fix the problem with dying imap on "Unrecognized event". The problem is that when we register a handle for IO_ERROR only, we still can get readable/writable event without EV_EOF being set. This case was not handled. -- Vaclav Haisman -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: io-kq.diff URL:
2004 Aug 23
1
[PATCH] pass struct io * to io_loop_handle_add()/io_loop_handle_remove()
...ruct ioloop *ioloop, struct io *io) { struct ioloop_handler_data *data = ioloop->handler_data; - int index; + enum io_condition condition = io->condition; + int index, fd = io->fd; index = data->fd_index[fd]; i_assert(index >= 0 && (unsigned int) index < data->fds_size); diff -urpNX /usr/share/dontdiff dovecot-1.0-test32.vanilla/src/lib/ioloop-select.c dovecot-1.0-test32/src/lib/ioloop-select.c --- dovecot-1.0-test32.vanilla/src/lib/ioloop-select.c 2003-08-27 01:18:16.000000000 +0400 +++ dovecot-1.0-test32/src/lib/ioloop-select.c 2004-08-21 18:28:38.000000000 +04...