| 61 | } |
| 62 | |
| 63 | static void *queue_send(struct io_uring *ring, int fd) |
| 64 | { |
| 65 | struct io_uring_sqe *sqe; |
| 66 | struct data *d; |
| 67 | |
| 68 | d = t_malloc(sizeof(*d)); |
| 69 | d->iov.iov_base = d->buf; |
| 70 | d->iov.iov_len = sizeof(d->buf); |
| 71 | |
| 72 | sqe = io_uring_get_sqe(ring); |
| 73 | io_uring_prep_writev(sqe, fd, &d->iov, 1, 0); |
| 74 | sqe->user_data = 1; |
| 75 | |
| 76 | return d; |
| 77 | } |
| 78 | |
| 79 | static void *queue_recv(struct io_uring *ring, int fd, bool fixed) |
| 80 | { |