search for: idx_size

Displaying 5 results from an estimated 5 matches for "idx_size".

2004 Oct 25
0
[PATCH] Request for testing: BSD kqueue ioloop handler
...include <sys/types.h> +#include <sys/event.h> +#include <sys/time.h> +#include <unistd.h> + +#define INITIAL_KQUEUE_EVENTS 128 + +struct ioloop_handler_data { + int kq; + + unsigned int events_size, events_pos, events_changed; + struct kevent *events; + + unsigned int idx_size; + struct io_list **fd_index; +}; + +void io_loop_handler_init(struct ioloop *ioloop) +{ + struct ioloop_handler_data *data; + + ioloop->handler_data = data = + p_new(ioloop->pool, struct ioloop_handler_data, 1); + + data->events_pos = 0; + data->events_changed = 0; + data->events_s...
2004 Aug 30
0
[PATCH] [RFC] epoll based ioloop handler (now with patch)
...e "ioloop-internal.h" + +#ifdef IOLOOP_EPOLL + +#include <sys/epoll.h> +#include <unistd.h> + +#define INITIAL_EPOLL_EVENTS 128 +#define EPOLL_IOS_PER_FD 2 + +struct ioloop_handler_data { + int epfd; + int events_size, events_pos; + struct epoll_event *events; + + unsigned int idx_size; + struct io_list **fd_index; +}; + +struct io_list { + int count; + struct io *ios[EPOLL_IOS_PER_FD]; +}; + +void io_loop_handler_init(struct ioloop *ioloop) +{ + struct ioloop_handler_data *data; + + ioloop->handler_data = data = + p_new(ioloop->pool, struct ioloop_handler_data, 1); + + da...
2004 Oct 07
0
[PATCH] add missing error check in epoll code
...dovecot-1.0-test46.vanilla/src/lib/ioloop-epoll.c 2004-09-06 00:59:47.000000000 +0400 +++ dovecot-1.0-test46/src/lib/ioloop-epoll.c 2004-10-05 21:39:52.000000000 +0400 @@ -57,6 +47,8 @@ void io_loop_handler_init(struct ioloop data->fd_index = p_new(ioloop->pool, struct io_list *, data->idx_size); data->epfd = epoll_create(INITIAL_EPOLL_EVENTS); + if (data->epfd < 0) + i_panic("epoll_create(): %m"); } void io_loop_handler_deinit(struct ioloop *ioloop) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: applicat...
2007 Mar 15
5
[PATCH 0/5] fix gcc warnings in CVS HEAD
Hi, I have rewritten the patches I submitted earlier today for the CVS HEAD. Some of the changes were already committed months ago. On 2007/03/15 12:30, Timo Sirainen <tss at iki.fi> wrote: > That's ok, but I'm not sure about bsearch_insert_pos(). It's the way it > is mostly because I wanted to keep bsearch() API. If it can't return > void * then maybe it could be
2004 Aug 23
1
[PATCH] pass struct io * to io_loop_handle_add()/io_loop_handle_remove()
...on condition) +void io_loop_handle_add(struct ioloop *ioloop, struct io *io) { struct ioloop_handler_data *data = ioloop->handler_data; + enum io_condition condition = io->condition; unsigned int old_size; - int index; + int index, fd = io->fd; if ((unsigned int) fd >= data->idx_size) { /* grow the fd -> index array */ @@ -97,11 +97,11 @@ void io_loop_handle_add(struct ioloop *i data->fds[index].events |= IO_POLL_OUTPUT; } -void io_loop_handle_remove(struct ioloop *ioloop, int fd, - enum io_condition condition) +void io_loop_handle_remove(struc...