diff options
author | Marcus Brinkmann <[email protected]> | 2003-09-14 14:48:48 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2003-09-14 14:48:48 +0000 |
commit | b4473cfffd836c7f7e69069cec2b6feb2f10f1d3 (patch) | |
tree | 2ce05f948afca85ea7a22b89ea122a3dc41c3011 /tests/gpg/t-thread1.c | |
parent | 2003-09-14 Marcus Brinkmann <[email protected]> (diff) | |
download | gpgme-b4473cfffd836c7f7e69069cec2b6feb2f10f1d3.tar.gz gpgme-b4473cfffd836c7f7e69069cec2b6feb2f10f1d3.zip |
doc/
2003-09-14 Marcus Brinkmann <[email protected]>
* gpgme.texi (Multi Threading): Correct documentation on memory
synchronization requirement.
tests/
2003-09-14 Marcus Brinkmann <[email protected]>
* gpg/t-thread1.c (main): Call init_gpgme here.
(initialize_gpgme): Function removed.
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"); |