--- libev/ev_iouring.c 2019/12/28 07:57:48 1.18 +++ libev/ev_iouring.c 2020/06/08 11:15:59 1.22 @@ -1,7 +1,7 @@ /* * libev linux io_uring fd activity backend * - * Copyright (c) 2019 Marc Alexander Lehmann + * Copyright (c) 2019-2020 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- @@ -60,11 +60,11 @@ * like a ยต-optimisation by the io_uring author for his personal * applications, to the detriment of everybody else who just wants * an event loop. but, umm, ok, if that's all, it could be worse. - * (from what I gather form Jens Axboe, it simply didn't occur to him, - * and he made good on it by adding an unlimited nuber of timeouts - * later :). + * (from what I gather from the author Jens Axboe, it simply didn't + * occur to him, and he made good on it by adding an unlimited number + * of timeouts later :). * h) initially there was a hardcoded limit of 4096 outstanding events. - * later versions not onlyx bump this to 32k, but also can handle + * later versions not only bump this to 32k, but also can handle * an unlimited amount of events, so this only affects the batch size. * i) unlike linux aio, you *can* register more then the limit * of fd events. while early verisons of io_uring signalled an overflow @@ -458,6 +458,7 @@ struct io_uring_sqe *sqe = iouring_sqe_get (EV_A); sqe->opcode = IORING_OP_POLL_ADD; sqe->fd = fd; + sqe->addr = 0; sqe->user_data = (uint32_t)fd | ((__u64)(uint32_t)anfds [fd].egen << 32); sqe->poll_events = (nev & EV_READ ? POLLIN : 0) @@ -518,7 +519,6 @@ if (ecb_expect_false (res < 0)) { /*TODO: EINVAL handling (was something failed with this fd)*/ - /*TODO: EBUSY happens when?*/ if (res == -EBADF) {