diff options
author | Koichi Sasada <[email protected]> | 2023-10-13 23:53:59 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2023-10-14 00:52:51 +0900 |
commit | 62dfaeec2c3f6be255f48419307e69bfcfb3d849 (patch) | |
tree | e5fd5922e0059455b967e6c2595c46d2afc6ff6e /thread_pthread.c | |
parent | 5808999d30fc7c4fd74048a50129fd87b590b41c (diff) |
disable MN schedulers for some platforms
* on `__EMSCRIPTEN__` provides epoll* declarations, but no implementations.
* on `NON_SCALAR_THREAD_ID`, now we can not debug issues on x390s/Ubuntu so skip it.
x390s/RHEL works fine, so I think we can remove second limitation but
I could not login to it so it seems hard to debug now.
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 1ca805843e..2435606132 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -70,11 +70,18 @@ static const void *const condattr_monotonic = NULL; // #define HAVE_SYS_EPOLL_H 0 #endif -#if HAVE_SYS_EPOLL_H && !defined(COROUTINE_PTHREAD_CONTEXT) - #include <sys/epoll.h> - #define USE_MN_THREADS 1 -#else - #define USE_MN_THREADS 0 +#ifndef USE_MN_THREADS + #if defined(__EMSCRIPTEN__) || defined(COROUTINE_PTHREAD_CONTEXT) || defined(NON_SCALAR_THREAD_ID) + // on __EMSCRIPTEN__ provides epoll* declarations, but no implementations. + // on COROUTINE_PTHREAD_CONTEXT, it doesn't worth to use it. + // on NON_SCALAR_THREAD_ID, now we can not debug issues on x390s/Ubuntu so skip it. + #define USE_MN_THREADS 0 + #elif HAVE_SYS_EPOLL_H + #include <sys/epoll.h> + #define USE_MN_THREADS 1 + #else + #define USE_MN_THREADS 0 + #endif #endif // native thread wrappers |