| 68 | } |
| 69 | |
| 70 | void io_uring_setup_ring_pointers(struct io_uring_params *p, |
| 71 | struct io_uring_sq *sq, |
| 72 | struct io_uring_cq *cq) |
| 73 | { |
| 74 | sq->khead = sq->ring_ptr + p->sq_off.head; |
| 75 | sq->ktail = sq->ring_ptr + p->sq_off.tail; |
| 76 | sq->kring_mask = sq->ring_ptr + p->sq_off.ring_mask; |
| 77 | sq->kring_entries = sq->ring_ptr + p->sq_off.ring_entries; |
| 78 | sq->kflags = sq->ring_ptr + p->sq_off.flags; |
| 79 | sq->kdropped = sq->ring_ptr + p->sq_off.dropped; |
| 80 | if (!(p->flags & IORING_SETUP_NO_SQARRAY)) |
| 81 | sq->array = sq->ring_ptr + p->sq_off.array; |
| 82 | |
| 83 | cq->khead = cq->ring_ptr + p->cq_off.head; |
| 84 | cq->ktail = cq->ring_ptr + p->cq_off.tail; |
| 85 | cq->kring_mask = cq->ring_ptr + p->cq_off.ring_mask; |
| 86 | cq->kring_entries = cq->ring_ptr + p->cq_off.ring_entries; |
| 87 | cq->koverflow = cq->ring_ptr + p->cq_off.overflow; |
| 88 | cq->cqes = cq->ring_ptr + p->cq_off.cqes; |
| 89 | if (p->cq_off.flags) |
| 90 | cq->kflags = cq->ring_ptr + p->cq_off.flags; |
| 91 | |
| 92 | sq->ring_mask = *sq->kring_mask; |
| 93 | sq->ring_entries = *sq->kring_entries; |
| 94 | cq->ring_mask = *cq->kring_mask; |
| 95 | cq->ring_entries = *cq->kring_entries; |
| 96 | } |
| 97 | |
| 98 | static size_t params_sqes_size(const struct io_uring_params *p, unsigned sqes) |
| 99 | { |
no outgoing calls
no test coverage detected