aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_limits.h
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-04-27 14:56:18 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-04-27 22:11:54 +0300
commit4ebe2aa5f995d4cbf45c63d277ad1653ffca7725 (patch)
treee2e461c08ffb487e08ca6c866f240e69b64397c5 /src/microhttpd/mhd_limits.h
parentf3d7ef1f5f1fc9d4e7c24ca3d0ff56dd381e644b (diff)
downloadlibmicrohttpd-4ebe2aa5f995d4cbf45c63d277ad1653ffca7725.tar.gz
libmicrohttpd-4ebe2aa5f995d4cbf45c63d277ad1653ffca7725.zip
thread-per-connection: improved timeout handling for 'poll()' mode, fixed short busy-waiting
* Avoid unneeded wake-ups * More precise timeout with milliseconds accuracy * Fixed potential short (less than one second) busy waiting when connection is about to expire.
Diffstat (limited to 'src/microhttpd/mhd_limits.h')
-rw-r--r--src/microhttpd/mhd_limits.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_limits.h b/src/microhttpd/mhd_limits.h
index a4e15423..b61da5f4 100644
--- a/src/microhttpd/mhd_limits.h
+++ b/src/microhttpd/mhd_limits.h
@@ -38,6 +38,14 @@
38 ( (type) ((( ((type) 1) << (sizeof(type) * 8 - 2)) - 1) * 2 + 1) ) 38 ( (type) ((( ((type) 1) << (sizeof(type) * 8 - 2)) - 1) * 2 + 1) )
39#define MHD_TYPE_IS_SIGNED_(type) (((type) 0)>((type) - 1)) 39#define MHD_TYPE_IS_SIGNED_(type) (((type) 0)>((type) - 1))
40 40
41#ifndef INT_MAX
42#ifdef __INT_MAX__
43#define INT_MAX __INT_MAX__
44#else /* ! __UINT_MAX__ */
45#define INT_MAX MHD_SIGNED_TYPE_MAX_ (int)
46#endif /* ! __UINT_MAX__ */
47#endif /* !UINT_MAX */
48
41#ifndef UINT_MAX 49#ifndef UINT_MAX
42#ifdef __UINT_MAX__ 50#ifdef __UINT_MAX__
43#define UINT_MAX __UINT_MAX__ 51#define UINT_MAX __UINT_MAX__