mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
init pthread mutexes only if an initializer exists
and windows has none Change-Id: Iaff3047abde197791e3fbb42c12066f896e540d1 Reviewed-on: http://gerrit.openafs.org/1169 Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
900dc5b31b
commit
c51e266183
@ -50,7 +50,11 @@ static int is_inited = 0;
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
pthread_mutex_t des_init_mutex
|
||||
#ifdef PTHREAD_MUTEX_INITIALIZER
|
||||
= PTHREAD_MUTEX_INITIALIZER
|
||||
#endif
|
||||
;
|
||||
#define LOCK_INIT assert(pthread_mutex_lock(&des_init_mutex)==0)
|
||||
#define UNLOCK_INIT assert(pthread_mutex_unlock(&des_init_mutex)==0)
|
||||
#else
|
||||
@ -189,7 +193,11 @@ static unsigned char sequence_number[8];
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
pthread_mutex_t des_random_mutex
|
||||
#ifdef PTHREAD_MUTEX_INITIALIZER
|
||||
= PTHREAD_MUTEX_INITIALIZER
|
||||
#endif
|
||||
;
|
||||
#define LOCK_RANDOM assert(pthread_mutex_lock(&des_random_mutex)==0)
|
||||
#define UNLOCK_RANDOM assert(pthread_mutex_unlock(&des_random_mutex)==0)
|
||||
#else
|
||||
|
@ -78,7 +78,11 @@ static fc_KeySchedule random_int32_schedule;
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
pthread_mutex_t rxkad_random_mutex
|
||||
#ifdef PTHREAD_MUTEX_INITIALIZER
|
||||
= PTHREAD_MUTEX_INITIALIZER
|
||||
#endif
|
||||
;
|
||||
#define LOCK_RM assert(pthread_mutex_lock(&rxkad_random_mutex)==0)
|
||||
#define UNLOCK_RM assert(pthread_mutex_unlock(&rxkad_random_mutex)==0)
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user