From b4473cfffd836c7f7e69069cec2b6feb2f10f1d3 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sun, 14 Sep 2003 14:48:48 +0000 Subject: doc/ 2003-09-14 Marcus Brinkmann * gpgme.texi (Multi Threading): Correct documentation on memory synchronization requirement. tests/ 2003-09-14 Marcus Brinkmann * gpg/t-thread1.c (main): Call init_gpgme here. (initialize_gpgme): Function removed. --- tests/gpg/t-thread1.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'tests/gpg/t-thread1.c') 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 @@ -31,22 +31,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"); -- cgit v1.2.3