summaryrefslogtreecommitdiff
path: root/random
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2011-12-01 13:55:06 +0100
committerWerner Koch <wk@gnupg.org>2011-12-01 13:59:38 +0100
commit5a1b2784cc1a718fd44d551b7ec018ef4614ce30 (patch)
tree94c27e5523a3ec115ed773a261b70a3f14a0bca8 /random
parent37810e520dba6fcb9da5a13bc6fdba9076cfe0f2 (diff)
downloadlibgcrypt-5a1b2784cc1a718fd44d551b7ec018ef4614ce30.tar.gz
Completed switch to a simpler thread model.
This is only a first step. We will need to either implement pthread_atfork or - better - make use use POSIX RT semaphores.
Diffstat (limited to 'random')
-rw-r--r--random/random-csprng.c4
-rw-r--r--random/random-daemon.c1
-rw-r--r--random/random-fips.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/random/random-csprng.c b/random/random-csprng.c
index 096a6748..50357d17 100644
--- a/random/random-csprng.c
+++ b/random/random-csprng.c
@@ -181,7 +181,7 @@ static int quick_test;
static int faked_rng;
/* This is the lock we use to protect all pool operations. */
-static ath_mutex_t pool_lock = ATH_MUTEX_INITIALIZER;
+static ath_mutex_t pool_lock;
/* This is a helper for assert calls. These calls are used to assert
that functions are called in a locked state. It is not meant to be
@@ -191,7 +191,7 @@ static int pool_is_locked;
/* This is the lock we use to protect the buffer used by the nonce
generation. */
-static ath_mutex_t nonce_buffer_lock = ATH_MUTEX_INITIALIZER;
+static ath_mutex_t nonce_buffer_lock;
/* We keep some counters in this structure for the sake of the
diff --git a/random/random-daemon.c b/random/random-daemon.c
index d8bfe4c6..9422e853 100644
--- a/random/random-daemon.c
+++ b/random/random-daemon.c
@@ -28,6 +28,7 @@
sensitive data.
*/
+#error This dameon needs to be fixed due to the ath changes
#include <config.h>
#include <stdio.h>
diff --git a/random/random-fips.c b/random/random-fips.c
index 307d2b2a..e0ae9683 100644
--- a/random/random-fips.c
+++ b/random/random-fips.c
@@ -72,7 +72,7 @@
integer variable is only used to check the locking state; that is,
it is not meant to be thread-safe but merely as a failsafe feature
to assert proper locking. */
-static ath_mutex_t fips_rng_lock = ATH_MUTEX_INITIALIZER;
+static ath_mutex_t fips_rng_lock;
static int fips_rng_is_locked;