Several areas in the code do something like this whenever the database
version is changed:
#ifdef AFS_PTHREAD_ENV
opr_cv_broadcast(&ubik_dbase->version_cond);
#else
LWP_NoYieldSignal(&ubik_dbase->version);
#endif
However, ever since commit
3fae4ea1 (ubik: remove unused code),
nothing in the tree waits for this condvar, so it currently doesn't do
anything. Remove this unneeded code.
Change-Id: I6903ed89f9dcee2ce154be8883d656d297c97902
Reviewed-on: https://gerrit.openafs.org/13361
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
UBIK_VERSION_LOCK;
dbase->version.counter++; /* bump commit count */
-#ifdef AFS_PTHREAD_ENV
- opr_cv_broadcast(&dbase->version_cond);
-#else
- LWP_NoYieldSignal(&dbase->version);
-#endif
code = udisk_LogEnd(dbase, &dbase->version);
if (code) {
dbase->version.counter--;
adbase->version.counter = 0;
(*adbase->setlabel) (adbase, 0, &adbase->version);
}
-#ifdef AFS_PTHREAD_ENV
- opr_cv_broadcast(&adbase->version_cond);
-#else
- LWP_NoYieldSignal(&adbase->version);
-#endif
UBIK_VERSION_UNLOCK;
}
return 0;
urecovery_state |= UBIK_RECHAVEDB;
}
udisk_Invalidate(ubik_dbase, 0); /* data has changed */
-#ifdef AFS_PTHREAD_ENV
- opr_cv_broadcast(&ubik_dbase->version_cond);
-#else
- LWP_NoYieldSignal(&ubik_dbase->version);
-#endif
}
if (!(urecovery_state & UBIK_RECHAVEDB)) {
DBRELE(ubik_dbase);
(*ubik_dbase->setlabel) (ubik_dbase, 0, &ubik_dbase->version);
UBIK_VERSION_UNLOCK;
udisk_Invalidate(ubik_dbase, 0); /* data may have changed */
-#ifdef AFS_PTHREAD_ENV
- opr_cv_broadcast(&ubik_dbase->version_cond);
-#else
- LWP_NoYieldSignal(&ubik_dbase->version);
-#endif
}
/* Check the other sites and send the database to them if they
#endif
memcpy(&ubik_dbase->version, avers, sizeof(struct ubik_version));
udisk_Invalidate(dbase, file); /* new dbase, flush disk buffers */
-#ifdef AFS_PTHREAD_ENV
- opr_Assert(pthread_cond_broadcast(&dbase->version_cond) == 0);
-#else
- LWP_NoYieldSignal(&dbase->version);
-#endif
failed_locked:
UBIK_VERSION_UNLOCK;
ubik_dbase = tdb; /* for now, only one db per server; can fix later when we have names for the other dbases */
#ifdef AFS_PTHREAD_ENV
- opr_cv_init(&tdb->version_cond);
opr_cv_init(&tdb->flags_cond);
#endif /* AFS_PTHREAD_ENV */
struct ubik_version cachedVersion; /*!< version of caller's cached data */
struct Lock cache_lock; /*!< protects cached application data */
#ifdef AFS_PTHREAD_ENV
- pthread_cond_t version_cond; /*!< condition variable to manage changes to version */
pthread_cond_t flags_cond; /*!< condition variable to manage changes to flags */
#endif
};