From 42516f2c0bb6445c9f870cf1943efa016d66349b Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Wed, 18 Nov 2009 14:05:02 -0500 Subject: [PATCH] fix for volser transaction object race conditions Spell AFS_PTHREAD_ENV correctly and fix missing pthread_mutex_init() argument. Change-Id: I9a6397ef5ba3ef7197f3d927759258be31914fd7 Reviewed-on: http://gerrit.openafs.org/841 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- src/volser/volser.p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/volser/volser.p.h b/src/volser/volser.p.h index 7fe5995..afc9ac6 100644 --- a/src/volser/volser.p.h +++ b/src/volser/volser.p.h @@ -58,7 +58,7 @@ struct volser_trans { /* the fields below are useful for debugging */ char lastProcName[30]; /* name of the last procedure which used transaction */ struct rx_call *rxCallPtr; /* pointer to latest associated rx_call */ -#ifdef AFS_PHTREAD_ENV +#ifdef AFS_PTHREAD_ENV pthread_mutex_t lock; /* per transaction lock */ #endif @@ -75,9 +75,9 @@ struct volser_dest { afs_int32 destSSID; }; -#ifdef AFS_PHTREAD_ENV +#ifdef AFS_PTHREAD_ENV #define VTRANS_OBJ_LOCK_INIT(tt) \ - assert(pthread_mutex_init(&((tt)->lock)) == 0) + assert(pthread_mutex_init(&((tt)->lock),NULL) == 0) #define VTRANS_OBJ_LOCK_DESTROY(tt) \ assert(pthread_mutex_destroy(&((tt)->lock)) == 0) #define VTRANS_OBJ_LOCK(tt) \ -- 1.9.4