From 9c7f6fa17209ce8cfbe73eefbcbb37aced31cc60 Mon Sep 17 00:00:00 2001 From: Peter Somogyi Date: Wed, 21 Sep 2005 16:13:28 +0000 Subject: [PATCH] pthread-glock-volatility-20050921 FIXES 21526 deal with situations where pthread glock assert happens by asserting volatility. ick. --- src/util/pthread_glock.c | 2 +- src/util/pthread_glock.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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) -- 2.39.5