laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmocore/+/36266?usp=email )
Change subject: io_uring: more verbose error messages if io_uring setup fails
......................................................................
io_uring: more verbose error messages if io_uring setup fails
"Assert failed 0 osmo_io_uring.c:94" is rather useless in terms of an
error message. Let's improve upon that.
Change-Id: I0ac9ae59e99c3704b3ce33919c9e7d11024476e3
---
M src/core/osmo_io_uring.c
1 file changed, 14 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/36266/1
diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c
index b174b22..7c9593e 100644
--- a/src/core/osmo_io_uring.c
+++ b/src/core/osmo_io_uring.c
@@ -91,12 +91,12 @@
int rc;
rc = io_uring_queue_init(IOFD_URING_ENTRIES, &g_ring.ring, 0);
if (rc < 0)
- OSMO_ASSERT(0);
+ osmo_panic("failure during io_uring_queue_init(): %s\n", strerror(-rc));
rc = eventfd(0, 0);
if (rc < 0) {
io_uring_queue_exit(&g_ring.ring);
- OSMO_ASSERT(0);
+ osmo_panic("failure creating eventfd(0, 0) for io_uring: %s\n",
strerror(-rc));
}
osmo_fd_setup(&g_ring.event_ofd, rc, OSMO_FD_READ, iofd_uring_poll_cb,
&g_ring.ring, 0);
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/36266?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0ac9ae59e99c3704b3ce33919c9e7d11024476e3
Gerrit-Change-Number: 36266
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange