From: Steven Jenkins Date: Mon, 8 Feb 2010 20:38:49 +0000 (-0600) Subject: tubik: Initialize mutexes and cvs X-Git-Tag: openafs-devel-1_5_72~36 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=80151fdfcacf8c2d673bf79ac9276b30979de976;p=packages%2Fo%2Fopenafs.git tubik: Initialize mutexes and cvs Initialize some mutexes and condition variables for pthreaded ubik. FIXES 124977 Change-Id: I95833c5e277183e3c912e1b2fde2b02f88cff0c9 Reviewed-on: http://gerrit.openafs.org/1253 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/ubik/ubik.c b/src/ubik/ubik.c index 4bcfe4920..4187ac0d7 100644 --- a/src/ubik/ubik.c +++ b/src/ubik/ubik.c @@ -431,6 +431,13 @@ ubik_ServerInitCommon(afs_int32 myHost, short myPort, *dbase = tdb; 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 + assert(pthread_cond_init(&tdb->version_cond, NULL) == 0); + assert(pthread_cond_init(&tdb->flags_cond, NULL) == 0); + assert(pthread_mutex_init(&tdb->version_mutex, NULL) == 0); + assert(pthread_mutex_init(&tdb->flags_mutex, NULL) == 0); +#endif /* AFS_PTHREAD_ENV */ + /* initialize RX */ /* the following call is idempotent so when/if it got called earlier,