diff options
Diffstat (limited to '')
-rw-r--r-- | tests/gpg/t-thread1.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/tests/gpg/t-thread1.c b/tests/gpg/t-thread1.c index 5b765a54..4c003b12 100644 --- a/tests/gpg/t-thread1.c +++ b/tests/gpg/t-thread1.c @@ -32,22 +32,6 @@ #define ROUNDS 20 -void -initialize_gpgme (void) -{ - static int gpgme_init; - static pthread_mutex_t gpgme_init_lock = PTHREAD_MUTEX_INITIALIZER; - - pthread_mutex_lock (&gpgme_init_lock); - if (!gpgme_init) - { - init_gpgme (GPGME_PROTOCOL_OpenPGP); - gpgme_init = 1; - } - pthread_mutex_unlock (&gpgme_init_lock); -} - - void * thread_one (void *name) { @@ -156,6 +140,8 @@ main (int argc, char *argv[]) pthread_t tone; pthread_t ttwo; + init_gpgme (GPGME_PROTOCOL_OpenPGP); + pthread_create (&tone, NULL, thread_one, "A"); pthread_create (&ttwo, NULL, thread_two, "A"); |