OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_73_1-9-gaf5923c
Gerrit Code Review
Thu, 1 Apr 2010 20:40:15 -0700 (PDT)
The following commit has been merged in the master branch:
Author: Andrew Deason <email@example.com>
Date: Thu Apr 1 16:42:25 2010 -0500
tubik: Correct use of flags_cond and version_cond
Waiters of flags_cond and version_cond were not doing so correctly;
the correct way is to acquire a lock prior to their respective checks,
and atomically drop/acquire that lock with pthread_cond_wait.
Otherwise, we could miss a wakeup if a flag changed between our check
and when we wait.
To make this possible, make versionLock a normal pthread mutex in
AFS_PTHREAD_ENV, so it is a lock we can pass to pthread_cond_wait.
Make the waiters pass versionLock to pthread_cond_wait, and eliminate
flags_mutex and version_mutex.
Tested-by: Andrew Deason <firstname.lastname@example.org>
Reviewed-by: Derrick Brashear <email@example.com>
Tested-by: Derrick Brashear <firstname.lastname@example.org>
src/ubik/ubik.c | 26 +++++++++++++++-----------
src/ubik/ubik.p.h | 15 ++++++++++-----
2 files changed, 25 insertions(+), 16 deletions(-)
OpenAFS Master Repository