Use number of CPUs in tests and examples

This commit is contained in:
Evgeny Grin (Karlson2k)
2014-03-06 13:22:35 +00:00
parent a9e36d3720
commit 20699d328b
25 changed files with 188 additions and 24 deletions
+8 -1
View File
@@ -33,6 +33,13 @@
#include <gcrypt.h>
#include "tls_test_common.h"
#if defined(CPU_COUNT) && (CPU_COUNT+0) < 4
#undef CPU_COUNT
#endif
#if !defined(CPU_COUNT)
#define CPU_COUNT 4
#endif
extern const char srv_key_pem[];
extern const char srv_self_signed_cert_pem[];
@@ -94,7 +101,7 @@ test_parallel_clients (void * cls, const char *cipher_suite,
int curl_proto_version)
{
int i;
int client_count = 3;
int client_count = (CPU_COUNT - 1);
void *client_thread_ret;
pthread_t client_arr[client_count];
struct https_test_data client_args =