MCPcopy Create free account
hub / github.com/axboe/liburing / handle_cancel

Function handle_cancel

examples/proxy.c:1801–1818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1799}
1800
1801static int handle_cancel(struct io_uring *ring, struct io_uring_cqe *cqe)
1802{
1803 struct conn *c = cqe_to_conn(cqe);
1804 int fd = cqe_to_fd(cqe);
1805
1806 c->pending_cancels--;
1807
1808 vlog("%d: got cancel fd %d, refs %d\n", c->tid, fd, c->pending_cancels);
1809
1810 if (!c->pending_cancels) {
1811 queue_shutdown_close(ring, c, c->in_fd);
1812 if (c->out_fd != -1)
1813 queue_shutdown_close(ring, c, c->out_fd);
1814 io_uring_submit(ring);
1815 }
1816
1817 return 0;
1818}
1819
1820static void open_socket(struct conn *c)
1821{

Callers 1

handle_cqeFunction · 0.85

Calls 4

cqe_to_connFunction · 0.85
cqe_to_fdFunction · 0.85
queue_shutdown_closeFunction · 0.85
io_uring_submitFunction · 0.85

Tested by

no test coverage detected