aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/internal.h
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-11-06 19:05:08 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-11-07 20:49:09 +0300
commit827edab065b400717b186e44b0190e7f33628434 (patch)
treef66030e6f278bc9bffc12db394f1a7788656a4ce /src/microhttpd/internal.h
parentb4401abfb7f16501168ed5ba68e241572a7c2b35 (diff)
downloadlibmicrohttpd-827edab065b400717b186e44b0190e7f33628434.tar.gz
libmicrohttpd-827edab065b400717b186e44b0190e7f33628434.zip
internal.h: added macros for internal threads modes detection
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r--src/microhttpd/internal.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index bd8b9ba0..0f8669f4 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -2533,6 +2533,29 @@ struct MHD_Daemon
2533#define MHD_D_IS_USING_EPOLL_(d) ((void) (d), 0) 2533#define MHD_D_IS_USING_EPOLL_(d) ((void) (d), 0)
2534#endif /* select() only */ 2534#endif /* select() only */
2535 2535
2536#if defined(MHD_USE_THREADS)
2537/**
2538 * Checks whether the @a d daemon is using internal polling thread
2539 */
2540#define MHD_D_IS_USING_THREADS_(d) \
2541 (0 != (d->options & (MHD_USE_INTERNAL_POLLING_THREAD)))
2542/**
2543 * Checks whether the @a d daemon is using thread-per-connection mode
2544 */
2545#define MHD_D_IS_USING_THREAD_PER_CONN_(d) \
2546 (0 != ((d)->options & MHD_USE_THREAD_PER_CONNECTION))
2547#else /* ! MHD_USE_THREADS */
2548/**
2549 * Checks whether the @a d daemon is using internal polling thread
2550 */
2551#define MHD_D_IS_USING_THREADS_(d) ((void) d, 0)
2552/**
2553 * Checks whether the @a d daemon is using thread-per-connection mode
2554 */
2555#define MHD_D_IS_USING_THREAD_PER_CONN_(d) ((void) d, 0)
2556#endif /* ! MHD_USE_THREADS */
2557
2558
2536#ifdef DAUTH_SUPPORT 2559#ifdef DAUTH_SUPPORT
2537 2560
2538/** 2561/**