aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r--src/microhttpd/internal.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 4ae577de..aa6af5e8 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -65,8 +65,10 @@
65#define MHD_PANIC(msg) do { mhd_panic (mhd_panic_cls, __FILE__, __LINE__, NULL); BUILTIN_NOT_REACHED; } while (0) 65#define MHD_PANIC(msg) do { mhd_panic (mhd_panic_cls, __FILE__, __LINE__, NULL); BUILTIN_NOT_REACHED; } while (0)
66#endif 66#endif
67 67
68#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
68#include "mhd_threads.h" 69#include "mhd_threads.h"
69#include "mhd_locks.h" 70#include "mhd_locks.h"
71#endif
70#include "mhd_sockets.h" 72#include "mhd_sockets.h"
71#include "mhd_itc_types.h" 73#include "mhd_itc_types.h"
72 74
@@ -333,11 +335,13 @@ struct MHD_Response
333 void *upgrade_handler_cls; 335 void *upgrade_handler_cls;
334#endif /* UPGRADE_SUPPORT */ 336#endif /* UPGRADE_SUPPORT */
335 337
338#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
336 /** 339 /**
337 * Mutex to synchronize access to @e data, @e size and 340 * Mutex to synchronize access to @e data, @e size and
338 * @e reference_count. 341 * @e reference_count.
339 */ 342 */
340 MHD_mutex_ mutex; 343 MHD_mutex_ mutex;
344#endif
341 345
342 /** 346 /**
343 * Set to #MHD_SIZE_UNKNOWN if size is not known. 347 * Set to #MHD_SIZE_UNKNOWN if size is not known.
@@ -746,11 +750,13 @@ struct MHD_Connection
746 */ 750 */
747 struct sockaddr *addr; 751 struct sockaddr *addr;
748 752
753#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
749 /** 754 /**
750 * Thread handle for this connection (if we are using 755 * Thread handle for this connection (if we are using
751 * one thread per connection). 756 * one thread per connection).
752 */ 757 */
753 MHD_thread_handle_ID_ pid; 758 MHD_thread_handle_ID_ pid;
759#endif
754 760
755 /** 761 /**
756 * Size of @e read_buffer (in bytes). This value indicates 762 * Size of @e read_buffer (in bytes). This value indicates
@@ -864,10 +870,12 @@ struct MHD_Connection
864 */ 870 */
865 bool read_closed; 871 bool read_closed;
866 872
873#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
867 /** 874 /**
868 * Set to `true` if the thread has been joined. 875 * Set to `true` if the thread has been joined.
869 */ 876 */
870 bool thread_joined; 877 bool thread_joined;
878#endif
871 879
872 /** 880 /**
873 * Are we currently inside the "idle" handler (to avoid recursively 881 * Are we currently inside the "idle" handler (to avoid recursively
@@ -1404,10 +1412,12 @@ struct MHD_Daemon
1404 */ 1412 */
1405 struct MHD_Daemon *master; 1413 struct MHD_Daemon *master;
1406 1414
1415#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
1407 /** 1416 /**
1408 * Worker daemons (one per thread) 1417 * Worker daemons (one per thread)
1409 */ 1418 */
1410 struct MHD_Daemon *worker_pool; 1419 struct MHD_Daemon *worker_pool;
1420#endif
1411 1421
1412 /** 1422 /**
1413 * Table storing number of connections per IP 1423 * Table storing number of connections per IP
@@ -1424,6 +1434,7 @@ struct MHD_Daemon
1424 */ 1434 */
1425 size_t pool_increment; 1435 size_t pool_increment;
1426 1436
1437#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
1427 /** 1438 /**
1428 * Size of threads created by MHD. 1439 * Size of threads created by MHD.
1429 */ 1440 */
@@ -1449,6 +1460,7 @@ struct MHD_Daemon
1449 * "manual_timeout" DLLs. 1460 * "manual_timeout" DLLs.
1450 */ 1461 */
1451 MHD_mutex_ cleanup_connection_mutex; 1462 MHD_mutex_ cleanup_connection_mutex;
1463#endif
1452 1464
1453 /** 1465 /**
1454 * Listen socket. 1466 * Listen socket.
@@ -1495,7 +1507,8 @@ struct MHD_Daemon
1495#endif 1507#endif
1496 1508
1497 /** 1509 /**
1498 * Inter-thread communication channel. 1510 * Inter-thread communication channel (also used to unblock
1511 * select() in non-threaded code).
1499 */ 1512 */
1500 struct MHD_itc_ itc; 1513 struct MHD_itc_ itc;
1501 1514
@@ -1678,10 +1691,12 @@ struct MHD_Daemon
1678 */ 1691 */
1679 struct MHD_NonceNc *nnc; 1692 struct MHD_NonceNc *nnc;
1680 1693
1694#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
1681 /** 1695 /**
1682 * A rw-lock for synchronizing access to @e nnc. 1696 * A rw-lock for synchronizing access to @e nnc.
1683 */ 1697 */
1684 MHD_mutex_ nnc_lock; 1698 MHD_mutex_ nnc_lock;
1699#endif
1685 1700
1686 /** 1701 /**
1687 * Size of `digest_auth_random. 1702 * Size of `digest_auth_random.