From: Peter Somogyi Date: Wed, 21 Sep 2005 16:13:28 +0000 (+0000) Subject: pthread-glock-volatility-20050921 X-Git-Tag: openafs-devel-1_5_0~320 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9c7f6fa17209ce8cfbe73eefbcbb37aced31cc60;p=packages%2Fo%2Fopenafs.git pthread-glock-volatility-20050921 FIXES 21526 deal with situations where pthread glock assert happens by asserting volatility. ick. --- diff --git a/src/util/pthread_glock.c b/src/util/pthread_glock.c index eec4a06b4..e6e6f78ed 100644 --- a/src/util/pthread_glock.c +++ b/src/util/pthread_glock.c @@ -26,7 +26,7 @@ RCSID pthread_recursive_mutex_t grmutex; -static int glock_init; +static int glock_init = 0; static pthread_once_t glock_init_once = PTHREAD_ONCE_INIT; static void diff --git a/src/util/pthread_glock.h b/src/util/pthread_glock.h index da6aefd04..1c9beeae6 100644 --- a/src/util/pthread_glock.h +++ b/src/util/pthread_glock.h @@ -16,9 +16,9 @@ typedef struct { pthread_mutex_t mut; - pthread_t owner; - unsigned int locked; - unsigned int times_inside; + volatile pthread_t owner; + volatile unsigned int locked; + volatile unsigned int times_inside; } pthread_recursive_mutex_t, *pthread_recursive_mutex_p; #if defined(AFS_NT40_ENV) && defined(AFS_PTHREAD_ENV)