Displaying 7 results from an estimated 7 matches for "fd_index".
2004 Oct 25
0
[PATCH] Request for testing: BSD kqueue ioloop handler
...#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_size = INITIAL_KQUEUE_EVENTS;...
2004 Aug 30
0
[PATCH] [RFC] epoll based ioloop handler (now with patch)
...t;
+
+#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);
+
+ data->events_pos = 0;
+ data...
2018 Feb 06
1
Segmentation fault in "make check" test_istream_multiplex for 2.3.0 on Solaris Sparc
...ash happens in ioloop-poll.c line 181 when running
test_istream_multiplex.c:
#0 io_loop_handler_run_internal (ioloop=ioloop at entry=0x130dd0) at
ioloop-poll.c:181
181 if (pollfd->revents != 0) {
Due to the code
180 pollfd = &ctx->fds[ctx->fd_index[io->fd]];
181 if (pollfd->revents != 0) {
I can see in gdb, that io->fd is "-1", so using it as an array index
doesn't make much sense:
(gdb) print io->fd
$2 = -1
and the resulting address of pollfd is not valid. The full io struct is:
(gdb) print...
2004 Oct 07
0
[PATCH] add missing error check in epoll code
.../ioloop-epoll.c dovecot-1.0-test46/src/lib/ioloop-epoll.c
--- 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...
2004 Oct 25
0
[PATCH] move iolist functions into separate file
...ot;
#ifdef IOLOOP_EPOLL
@@ -21,13 +22,6 @@
#define INITIAL_EPOLL_EVENTS 128
-enum {
- EPOLL_LIST_INPUT,
- EPOLL_LIST_OUTPUT,
-
- EPOLL_IOS_PER_FD
-};
-
struct ioloop_handler_data {
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_EPOL...
2004 Aug 23
1
[PATCH] pass struct io * to io_loop_handle_add()/io_loop_handle_remove()
...p *ioloop, int fd,
- enum io_condition condition)
+void io_loop_handle_remove(struct 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 +...
2015 Jul 01
12
[PATCH 1/9] v2v: Stable bus and slot numbers for removable drives (RHBZ#1238053).
This patch series adds stable bus and slot numbers for removable
drives (CDs and floppies) when the guest is converted using virt-v2v
or virt-p2v.
Previously we were a bit random about this. After this patch series,
the bus and slot numbers and preserved if at all possible.
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1238053
Rich.