mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-10-07 04:02:18 +03:00
Use number of CPUs in tests and examples
This commit is contained in:
1 parent
a9e36d3720
commit
20699d328b
25 files changed
+188
-24
No files matched your search
@@ -25,6 +25,13 @@
|
||||
#include "platform.h"
|
||||
#include <microhttpd.h>
|
||||
|
||||
#if defined(CPU_COUNT) && (CPU_COUNT+0) < 2
|
||||
#undef CPU_COUNT
|
||||
#endif
|
||||
#if !defined(CPU_COUNT)
|
||||
#define CPU_COUNT 2
|
||||
#endif
|
||||
|
||||
#define PAGE "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>"
|
||||
|
||||
|
||||
@@ -34,7 +41,7 @@
|
||||
* Number of threads to run in the thread pool. Should (roughly) match
|
||||
* the number of cores on your system.
|
||||
*/
|
||||
#define NUMBER_OF_THREADS 4
|
||||
#define NUMBER_OF_THREADS CPU_COUNT
|
||||
|
||||
static unsigned int small_deltas[SMALL];
|
||||
|
||||
|
||||
Reference in new issue
Block a user