search for: io_loop_handler_deinit

Displaying 8 results from an estimated 8 matches for "io_loop_handler_deinit".

2004 Aug 23
1
[PATCH] pass struct io * to io_loop_handle_add()/io_loop_handle_remove()
...n condition); -void io_loop_handle_remove(struct ioloop *ioloop, int fd, - enum io_condition condition); +void io_loop_handle_add(struct ioloop *ioloop, struct io *io); +void io_loop_handle_remove(struct ioloop *ioloop, struct io *io); void io_loop_handler_init(struct ioloop *ioloop); void io_loop_handler_deinit(struct ioloop *ioloop); diff -urpNX /usr/share/dontdiff dovecot-1.0-test32.vanilla/src/lib/ioloop-poll.c dovecot-1.0-test32/src/lib/ioloop-poll.c --- dovecot-1.0-test32.vanilla/src/lib/ioloop-poll.c 2003-08-27 01:18:16.000000000 +0400 +++ dovecot-1.0-test32/src/lib/ioloop-poll.c 2004-08-21 18:46:22...
2005 Dec 14
2
Patch: ioloop using kqueue/kevent for FreeBSD
...if (ctx->kq < 0) + i_fatal("kqueue(): %m"); + + ctx->fds_size = INITIAL_BUF_SIZE; + ctx->fds = p_new(ioloop->pool, struct fdrecord, ctx->fds_size); + memset(ctx->fds, 0, sizeof(struct fdrecord) * ctx->fds_size); +} + + +void io_loop_handler_deinit(struct ioloop *ioloop) +{ + p_free(ioloop->pool, ioloop->handler_context->evbuf); + p_free(ioloop->pool, ioloop->handler_context->fds); + p_free(ioloop->pool, ioloop->handler_context); +} + + +void io_loop_handle_add(struct ioloop *ioloop, struct io *io)...
2004 Oct 07
0
[PATCH] add missing error check in epoll code
...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: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20041007/b575cec4/attachment-0001.bin>
2004 Oct 25
0
[PATCH] move iolist functions into separate file
...int epfd; int events_size, events_pos; @@ -37,10 +31,6 @@ struct ioloop_handler_data { struct io_list **fd_index; }; -struct io_list { - struct io *ios[EPOLL_IOS_PER_FD]; -}; - void io_loop_handler_init(struct ioloop *ioloop) { struct ioloop_handler_data *data; @@ -74,58 +64,6 @@ void io_loop_handler_deinit(struct ioloo #define IO_EPOLL_INPUT (EPOLLIN | EPOLLPRI | EPOLLERR | EPOLLHUP) #define IO_EPOLL_OUTPUT (EPOLLOUT | EPOLLERR | EPOLLHUP) -static int epoll_event_mask(struct io_list *list) -{ - int events = 0, i; - struct io *io; - - for (i = 0; i < EPOLL_IOS_PER_FD; i++) { - io = list->io...
2004 Oct 25
0
[PATCH] Request for testing: BSD kqueue ioloop handler
...nts = p_new(ioloop->pool, struct kevent, data->events_size); + + data->idx_size = INITIAL_KQUEUE_EVENTS; + data->fd_index = p_new(ioloop->pool, struct io_list *, data->idx_size); + + data->kq = kqueue(); + if (data->kq < 0) + i_panic("kqueue(): %m"); +} + +void io_loop_handler_deinit(struct ioloop *ioloop) +{ + struct ioloop_handler_data *data = ioloop->handler_data; + + close(data->kq); + p_free(ioloop->pool, data->events); + p_free(ioloop->pool, data->fd_index); + p_free(ioloop->pool, data); +} + +void io_loop_handle_add(struct ioloop *ioloop, struct io *...
2004 Aug 30
0
[PATCH] [RFC] epoll based ioloop handler (now with patch)
..._EVENTS; + data->events = p_new(ioloop->pool, struct epoll_event, + data->events_size); + + data->idx_size = INITIAL_EPOLL_EVENTS; + data->fd_index = p_new(ioloop->pool, struct io_list *, data->idx_size); + + data->epfd = epoll_create(INITIAL_EPOLL_EVENTS); +} + +void io_loop_handler_deinit(struct ioloop *ioloop) +{ + struct ioloop_handler_data *data = ioloop->handler_data; + + close(data->epfd); + p_free(ioloop->pool, ioloop->handler_data->events); + p_free(ioloop->pool, ioloop->handler_data->fd_index); + p_free(ioloop->pool, ioloop->handler_data); +} +...
2003 Apr 16
1
PATCH Add support for kqueue in ioloop subsystem
...ioloop_handler_data *data; ioloop->handler_data = data = p_new(ioloop->pool, struct ioloop_handler_data, 1); data->kq = kqueue(); if (data->kq < 0) { i_fatal("couldn't initialise kqueue: %m"); } memset(&data->event, 0, sizeof(struct kevent)); } void io_loop_handler_deinit(struct ioloop *ioloop) { p_free(ioloop->pool, ioloop->handler_data); } void io_loop_handle_add(struct ioloop *ioloop, int fd, int condition) { short filter; struct ioloop_handler_data *data = ioloop->handler_data; i_assert(fd >= 0); if (condition & IO_READ) filter |= EVFIL...
2005 Dec 15
2
Patch: More of kqueue() support.
...t;sys/event.h> #include <sys/time.h> @@ -24,6 +25,8 @@ # define INITIAL_BUF_SIZE 128 #endif +#define MASK (IO_READ | IO_WRITE | IO_ERROR) + struct ioloop_handler_context { int kq; size_t evbuf_size; @@ -57,6 +60,7 @@ void io_loop_handler_init(struct ioloop void io_loop_handler_deinit(struct ioloop *ioloop) { + close(ioloop->handler_context->kq); p_free(ioloop->pool, ioloop->handler_context->evbuf); p_free(ioloop->pool, ioloop->handler_context->fds); p_free(ioloop->pool, ioloop->handler_context); @@ -66,8 +70,8 @@...