try another tac

This commit is contained in:
Christian Grothoff 2021-01-28 22:36:02 +01:00
parent 0e10a48a17
commit 7d0d8d9f1c
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 8 additions and 0 deletions

View File

@ -389,6 +389,8 @@ sign_worker (void *cls)
if (! in_shutdown) if (! in_shutdown)
break; break;
/* queue is empty, wait for work */ /* queue is empty, wait for work */
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Crypto worker waiting for work...\n");
GNUNET_assert (0 == GNUNET_assert (0 ==
pthread_cond_wait (&work_cond, pthread_cond_wait (&work_cond,
&work_lock)); &work_lock));
@ -1629,6 +1631,8 @@ run (void *cls,
/* start crypto workers */ /* start crypto workers */
if (0 == num_workers) if (0 == num_workers)
num_workers = sysconf (_SC_NPROCESSORS_CONF); num_workers = sysconf (_SC_NPROCESSORS_CONF);
if (0 == num_workers)
num_workers = 1;
workers = GNUNET_new_array (num_workers, workers = GNUNET_new_array (num_workers,
pthread_t); pthread_t);
for (unsigned int i = 0; i<num_workers; i++) for (unsigned int i = 0; i<num_workers; i++)

View File

@ -449,6 +449,8 @@ sign_worker (void *cls)
if (! in_shutdown) if (! in_shutdown)
break; break;
/* queue is empty, wait for work */ /* queue is empty, wait for work */
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Crypto worker waiting for work...\n");
GNUNET_assert (0 == GNUNET_assert (0 ==
pthread_cond_wait (&work_cond, pthread_cond_wait (&work_cond,
&work_lock)); &work_lock));
@ -2020,6 +2022,8 @@ run (void *cls,
/* start crypto workers */ /* start crypto workers */
if (0 == num_workers) if (0 == num_workers)
num_workers = sysconf (_SC_NPROCESSORS_CONF); num_workers = sysconf (_SC_NPROCESSORS_CONF);
if (0 == num_workers)
num_workers = 1;
workers = GNUNET_new_array (num_workers, workers = GNUNET_new_array (num_workers,
pthread_t); pthread_t);
for (unsigned int i = 0; i<num_workers; i++) for (unsigned int i = 0; i<num_workers; i++)