linux: disable io_uring on 32 bits arm systems (#4187)

It's been reported that no released kernels are bug-free enough to use
io_uring without causing regressions.

Fixes: https://github.com/libuv/libuv/issues/4158
This commit is contained in:
Ben Noordhuis 2023-10-28 13:18:42 +02:00 committed by GitHub
parent 7b34154cf2
commit a389393ffa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -475,6 +475,9 @@ int uv__io_uring_register(int fd, unsigned opcode, void* arg, unsigned nargs) {
static int uv__use_io_uring(void) {
#if defined(__ANDROID_API__)
return 0; /* Possibly available but blocked by seccomp. */
#elif defined(__arm__) && __SIZEOF_POINTER__ == 4
/* See https://github.com/libuv/libuv/issues/4158. */
return 0; /* All 32 bits kernels appear buggy. */
#else
/* Ternary: unknown=0, yes=1, no=-1 */
static _Atomic int use_io_uring;