# HG changeset patch # User Kim Alvefur # Date 1645969003 -3600 # Node ID cf2086a1bd45db96dd08655b76f2ca87952c077d # Parent 89855432333831c46df515c68021e3a2d192ae22 util.poll: Expose API (epoll or select) used Could he handy to know for debugging or decisions diff -r 898554323338 -r cf2086a1bd45 teal-src/util/poll.d.tl --- a/teal-src/util/poll.d.tl Wed Feb 23 20:30:22 2022 +0100 +++ b/teal-src/util/poll.d.tl Sun Feb 27 14:36:43 2022 +0100 @@ -19,6 +19,11 @@ new : function () : state ENOENT : integer EEXIST : integer + enum api_backend + "epoll" + "select" + end + api : api_backend end return lib diff -r 898554323338 -r cf2086a1bd45 util-src/poll.c --- a/util-src/poll.c Wed Feb 23 20:30:22 2022 +0100 +++ b/util-src/poll.c Sun Feb 27 14:36:43 2022 +0100 @@ -14,8 +14,10 @@ #if defined(__linux__) #define USE_EPOLL +#define POLL_BACKEND "epoll" #else #define USE_SELECT +#define POLL_BACKEND "select" #endif #ifdef USE_EPOLL @@ -31,12 +33,7 @@ #include #include -#ifdef USE_EPOLL -#define STATE_MT "util.poll" -#endif -#ifdef USE_SELECT -#define STATE_MT "util.poll