OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_73_1-9-gaf5923c
Gerrit Code Review
gerrit@openafs.org
Thu, 1 Apr 2010 20:40:15 -0700 (PDT)
The following commit has been merged in the master branch:
commit af5923c0507f45fc4124ed9ae5ac5ed014923034
Author: Andrew Deason <adeason@sinenomine.net>
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.
Change-Id: Id33a72182b907d069e342cb049e23868ab2f7eb9
Reviewed-on: http://gerrit.openafs.org/1681
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/ubik/ubik.c | 26 +++++++++++++++-----------
src/ubik/ubik.p.h | 15 ++++++++++-----
2 files changed, 25 insertions(+), 16 deletions(-)
--
OpenAFS Master Repository