Displaying 3 results from an estimated 3 matches for "iolist_del".
2004 Oct 25
0
[PATCH] move iolist functions into separate file
...IOLIST_INPUT] = io;
+ return list->ios[IOLIST_OUTPUT] == NULL;
+ }
+ if ((io->condition & IO_WRITE) != 0) {
+ i_assert(list->ios[IOLIST_OUTPUT] == NULL);
+ list->ios[IOLIST_OUTPUT] = io;
+ return list->ios[IOLIST_INPUT] == NULL;
+ }
+
+ i_unreached();
+ return TRUE;
+}
+
+int iolist_del(struct io_list *list, struct io *io)
+{
+ if (list->ios[IOLIST_INPUT] == io) {
+ list->ios[IOLIST_INPUT] = NULL;
+ return list->ios[IOLIST_OUTPUT] == NULL;
+ }
+ if (list->ios[IOLIST_OUTPUT] == io) {
+ list->ios[IOLIST_OUTPUT] = NULL;
+ return list->ios[IOLIST_INPUT] == NULL;...
2004 Aug 30
0
[PATCH] [RFC] epoll based ioloop handler (now with patch)
...events;
+}
+
+static void iolist_add(struct io_list *list, struct io *io)
+{
+ int i;
+
+ i_assert(list->count < EPOLL_IOS_PER_FD);
+
+ for (i = 0; i < EPOLL_IOS_PER_FD; i++) {
+ if (!list->ios[i]) {
+ list->ios[i] = io;
+ break;
+ }
+ }
+
+ list->count++;
+}
+
+static void iolist_del(struct io_list *list, struct io *io)
+{
+ int i;
+
+ for (i = 0; i < EPOLL_IOS_PER_FD; i++) {
+ if (list->ios[i] == io) {
+ list->ios[i] = NULL;
+ break;
+ }
+ }
+
+ list->count--;
+}
+
+void io_loop_handle_add(struct ioloop *ioloop, struct io *io)
+{
+ struct ioloop_handler_data...
2004 Oct 25
0
[PATCH] Request for testing: BSD kqueue ioloop handler
...EV_ADD | EV_EOF, 0, 0, io);
+}
+
+void io_loop_handle_remove(struct ioloop *ioloop, struct io *io)
+{
+ struct ioloop_handler_data *data = ioloop->handler_data;
+ struct io_list *list = data->fd_index[io->fd];
+ struct kevent *event;
+ int i, changed = data->events_changed;
+
+ iolist_del(list, io);
+
+ /* Check ios not yet added to the queue */
+ for (i = 0 ; i < changed ; i++) {
+ if (data->events[i].udata == io) {
+ if (i < changed - 1)
+ data->events[i] = data->events[changed];
+ data->events_changed--;
+ return;
+ }
+ }
+
+ event = data->events +...