| 485 | } |
| 486 | |
| 487 | __cold struct io_uring_probe *io_uring_get_probe_ring(struct io_uring *ring) |
| 488 | { |
| 489 | struct io_uring_probe *probe; |
| 490 | size_t len; |
| 491 | int r; |
| 492 | |
| 493 | len = sizeof(*probe) + 256 * sizeof(struct io_uring_probe_op); |
| 494 | probe = malloc(len); |
| 495 | if (!probe) |
| 496 | return NULL; |
| 497 | memset(probe, 0, len); |
| 498 | |
| 499 | r = io_uring_register_probe(ring, probe, 256); |
| 500 | if (r >= 0) |
| 501 | return probe; |
| 502 | |
| 503 | free(probe); |
| 504 | return NULL; |
| 505 | } |
| 506 | |
| 507 | __cold struct io_uring_probe *io_uring_get_probe(void) |
| 508 | { |