Lines Matching refs:threads
95 static pthread_info_t threads[MAX_NUM_THREADS];
247 if (threads[i].active == 0) {
251 if (threads[i].data.thread_complete == 1) {
253 pthread_join(threads[i].thread, NULL);
254 memset(&threads[i], 0, sizeof(pthread_info_t));
266 memcpy(&threads[i].data, &base_info, sizeof(base_info));
267 threads[i].active = 1;
268 memcpy(&threads[i].data.client_fd, client_fd, sizeof(mbedtls_net_context));
270 if ((ret = pthread_create(&threads[i].thread, NULL, handle_ssl_connection,
271 &threads[i].data)) != 0) {
310 memset(threads, 0, sizeof(threads));
319 * We use only a single entropy source that is used in all the threads.