Skip to content

Commit

Permalink
Improve -EINTR detection in um_wait_for_cqe_without_gvl
Browse files Browse the repository at this point in the history
  • Loading branch information
noteflakes committed Nov 12, 2024
1 parent ce23139 commit 6aa7886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/um/um.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void *um_wait_for_cqe_without_gvl(void *ptr) {
//
// https://github.com/axboe/liburing/issues/1280
int res = io_uring_submit_and_wait_timeout(&ctx->machine->ring, &ctx->cqe, 1, NULL, NULL);
ctx->result = (!ctx->cqe) ? -EINTR : res;
ctx->result = (res > 0 && !ctx->cqe) ? -EINTR : res;
}
else
ctx->result = io_uring_wait_cqe(&ctx->machine->ring, &ctx->cqe);
Expand Down

0 comments on commit 6aa7886

Please sign in to comment.