libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 827edab065b400717b186e44b0190e7f33628434
parent b4401abfb7f16501168ed5ba68e241572a7c2b35
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon,  6 Nov 2023 19:05:08 +0300

internal.h: added macros for internal threads modes detection

Diffstat:
Msrc/microhttpd/internal.h | 23+++++++++++++++++++++++
1 file changed, 23 insertions(+), 0 deletions(-)

diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h @@ -2533,6 +2533,29 @@ struct MHD_Daemon #define MHD_D_IS_USING_EPOLL_(d) ((void) (d), 0) #endif /* select() only */ +#if defined(MHD_USE_THREADS) +/** + * Checks whether the @a d daemon is using internal polling thread + */ +#define MHD_D_IS_USING_THREADS_(d) \ + (0 != (d->options & (MHD_USE_INTERNAL_POLLING_THREAD))) +/** + * Checks whether the @a d daemon is using thread-per-connection mode + */ +#define MHD_D_IS_USING_THREAD_PER_CONN_(d) \ + (0 != ((d)->options & MHD_USE_THREAD_PER_CONNECTION)) +#else /* ! MHD_USE_THREADS */ +/** + * Checks whether the @a d daemon is using internal polling thread + */ +#define MHD_D_IS_USING_THREADS_(d) ((void) d, 0) +/** + * Checks whether the @a d daemon is using thread-per-connection mode + */ +#define MHD_D_IS_USING_THREAD_PER_CONN_(d) ((void) d, 0) +#endif /* ! MHD_USE_THREADS */ + + #ifdef DAUTH_SUPPORT /**