Make epoll the default on Linux for event loop implementations.

This commit is contained in:
Calvin Rose 2021-07-21 21:46:26 -05:00
parent 2e58f5f0d4
commit 54d73f6722
3 changed files with 7 additions and 2 deletions

View File

@ -72,7 +72,7 @@ conf.set('JANET_NO_UMASK', not get_option('umask'))
conf.set('JANET_NO_REALPATH', not get_option('realpath'))
conf.set('JANET_NO_PROCESSES', not get_option('processes'))
conf.set('JANET_SIMPLE_GETLINE', get_option('simple_getline'))
conf.set('JANET_EV_EPOLL', get_option('epoll'))
conf.set('JANET_EV_NO_EPOLL', not get_option('epoll'))
conf.set('JANET_NO_THREADS', get_option('threads'))
if get_option('os_name') != ''
conf.set('JANET_OS_NAME', get_option('os_name'))

View File

@ -47,7 +47,7 @@
/* #define JANET_STACK_MAX 16384 */
/* #define JANET_OS_NAME my-custom-os */
/* #define JANET_ARCH_NAME pdp-8 */
/* #define JANET_EV_EPOLL */
/* #define JANET_EV_NO_EPOLL */
/* Custom vm allocator support */
/* #include <mimalloc.h> */

View File

@ -193,6 +193,11 @@ extern "C" {
#define JANET_INT_TYPES
#endif
/* Enable or disable epoll on Linux */
#if defined(JANET_LINUX) && !defined(JANET_EV_NO_EPOLL)
#define JANET_EV_EPOLL
#endif
/* How to export symbols */
#ifndef JANET_API
#ifdef JANET_WINDOWS